com php-src: stat is done by php: ext/fileinfo/libmagic/fsmagic.c
| From: | Anatol Belski | Date: | Sun, 08 Mar 2015 18:47:42 +0000 |
| Subject: | com php-src: stat is done by php: ext/fileinfo/libmagic/fsmagic.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85341@lists.php.net to get a copy of this message | ||
Commit: 75a1392fb5753a6408c165c80f205c22f80386d9
Author: Anatol Belski <ab@php.net> Thu, 5 Mar 2015 14:08:22 +0100
Parents: 49dc53722b7ab2cdff1d887e4b23a0f7d0f57f63
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75a1392fb5753a6408c165c80f205c22f80386d9
Log:
stat is done by php
Changed paths:
M ext/fileinfo/libmagic/fsmagic.c
Diff:
diff --git a/ext/fileinfo/libmagic/fsmagic.c b/ext/fileinfo/libmagic/fsmagic.c
index 6a8f8f1..7f92115 100644
--- a/ext/fileinfo/libmagic/fsmagic.c
+++ b/ext/fileinfo/libmagic/fsmagic.c
@@ -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;