]> granicus.if.org Git - php/commitdiff
max this use the virtual_filepath() function and feel all threadsafe and
authorSterling Hughes <sterling@php.net>
Wed, 11 Sep 2002 22:40:56 +0000 (22:40 +0000)
committerSterling Hughes <sterling@php.net>
Wed, 11 Sep 2002 22:40:56 +0000 (22:40 +0000)
wholesome inside

ext/standard/filestat.c

index 4195aa0f8eb22f1667a2983f5ce31cedf4e213f5..85b28bfe9f791a538511ecb82ad28423a18acbd4 100644 (file)
@@ -570,6 +570,19 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
        }
 
 #ifndef PHP_WIN32
+#if VIRTUAL_DIR
+       do {
+               char *tmpname;
+
+               if (virtual_filepath(filename, &tmpname TSRMLS_CC)) {
+                       php_error(E_WARNING, "Cannot get the virtual filepath of %s\n", filename);
+                       RETURN_FALSE;
+               }
+
+               filename = tmpname;
+       } while (0);
+#endif
+
        switch (type) {
                case FS_IS_W:
                        RETURN_BOOL (!access (filename, W_OK));