1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00

stat is done by php

This commit is contained in:
Anatol Belski
2015-03-05 14:08:22 +01:00
parent a1883a8523
commit f3fad68efd

View 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;