]> granicus.if.org Git - php/commitdiff
partially revert wrong merge
authorAnatol Belski <ab@php.net>
Sun, 8 Mar 2015 19:05:34 +0000 (20:05 +0100)
committerAnatol Belski <ab@php.net>
Sun, 8 Mar 2015 19:05:34 +0000 (20:05 +0100)
ext/fileinfo/libmagic/fsmagic.c

index 6a8f8f1eb3b2dd374115bf86ee97e5d3a556130c..7f9211597dcff0012f28dd256d9607c65627fc95 100644 (file)
@@ -107,16 +107,6 @@ file_fsmagic(struct magic_set *ms, const char *fn, zend_stat_t *sb, php_stream *
        }
 
 #define COMMA  (did++ ? ", " : "")
-       /*
-        * Fstat is cheaper but fails for files you don't have read perms on.
-        * On 4.2BSD and similar systems, use lstat() to identify symlinks.
-        */
-#ifdef S_IFLNK
-       if ((ms->flags & MAGIC_SYMLINK) == 0)
-               ret = lstat(fn, sb);
-       else
-#endif
-       ret = stat(fn, sb);     /* don't merge into if; see "ret =" above */
 
        if (stream) {
                php_stream_statbuf ssb;