]> granicus.if.org Git - php/commitdiff
fix #38276 (file_exists() works incorrectly with long filenames on Windows)
authorAntony Dovgal <tony2001@php.net>
Thu, 3 Aug 2006 14:16:56 +0000 (14:16 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 3 Aug 2006 14:16:56 +0000 (14:16 +0000)
aka "Ilia forgot to MFB fix for #31347"

TSRM/tsrm_virtual_cwd.c

index 59a6b81d1deb861e2a52fa350632ca9a9a65ff8d..3c713a1f79dcbffce21d2262b0cbe3caa4e631c6 100644 (file)
@@ -706,7 +706,9 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
        }
 
        CWD_STATE_COPY(&new_state, &CWDG(cwd));
-       virtual_file_ex(&new_state, path, NULL, 1);
+       if (virtual_file_ex(&new_state, path, NULL, 1)) {
+               return -1;
+       }
 
        f = fopen(new_state.cwd, mode);