Skip to content

Commit 43652d3

Browse files
committed
simplify error handling for dirs as magic
1 parent 91aa340 commit 43652d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/fileinfo/libmagic/apprentice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ apprentice_map(struct magic_set *ms, const char *fn)
26162616
return to give apprentice_load() a chance. */
26172617
if (php_stream_stat_path_ex((char *)fn, 0, &st, NULL) == SUCCESS) {
26182618
if (st.sb.st_mode & S_IFDIR) {
2619-
goto error;
2619+
return NULL;
26202620
}
26212621
}
26222622
#endif

0 commit comments

Comments
 (0)