From b34bec20a7b83b67c8506e5c8a1bdd16d6fec665 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Wed, 11 Sep 2002 22:40:56 +0000 Subject: [PATCH] max this use the virtual_filepath() function and feel all threadsafe and wholesome inside --- ext/standard/filestat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 4195aa0f8e..85b28bfe9f 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -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)); -- 2.50.1