diff options
author | Anatoliy Belsky <ab@php.net> | 2012-11-27 16:33:58 +0100 |
---|---|---|
committer | Anatoliy Belsky <ab@php.net> | 2012-11-27 16:33:58 +0100 |
commit | e6b727d3b7eef06d8b7b6a4638a95e7a571d97b5 (patch) | |
tree | 3b181a41d663f18bb03e87e629806ae670fb5d0b /ext/fileinfo/libmagic/apprentice.c | |
parent | eff12e56b63531ca70f2bc55bbb59366b65191e0 (diff) | |
download | php-git-e6b727d3b7eef06d8b7b6a4638a95e7a571d97b5.tar.gz |
Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows
Diffstat (limited to 'ext/fileinfo/libmagic/apprentice.c')
-rw-r--r-- | ext/fileinfo/libmagic/apprentice.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index ee1ad4d6e8..e88a3e6c86 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -2406,7 +2406,11 @@ mkdbname(struct magic_set *ms, const char *fn, int strip) /* Compatibility with old code that looked in .mime */ if (ms->flags & MAGIC_MIME) { spprintf(&buf, MAXPATHLEN, "%.*s.mime%s", (int)(q - fn), fn, ext); +#ifdef PHP_WIN32 + if (VCWD_ACCESS(buf, R_OK) == 0) { +#else if (VCWD_ACCESS(buf, R_OK) != -1) { +#endif ms->flags &= MAGIC_MIME_TYPE; return buf; } |