Skip to content

Commit 397277b

Browse files
author
Sascha Schumann
committed
Fix php_stat brokenness.
1 parent db3f744 commit 397277b

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

ext/standard/filestat.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -573,28 +573,16 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
573573
}
574574

575575
#ifndef PHP_WIN32
576-
#ifdef VIRTUAL_DIR
577-
{
578-
char *tmpname;
579-
580-
if (virtual_filepath(filename, &tmpname TSRMLS_CC)) {
581-
php_error(E_WARNING, "Cannot get the virtual filepath of %s\n", filename);
582-
RETURN_FALSE;
583-
}
584-
585-
filename = tmpname;
586-
}
587-
#endif
588576

589577
switch (type) {
590578
case FS_IS_W:
591-
RETURN_BOOL (!access (filename, W_OK));
579+
RETURN_BOOL (!VCWD_ACCESS(filename, W_OK));
592580
case FS_IS_R:
593-
RETURN_BOOL (!access (filename, R_OK));
581+
RETURN_BOOL (!VCWD_ACCESS(filename, R_OK));
594582
case FS_IS_X:
595-
RETURN_BOOL (!access (filename, X_OK));
583+
RETURN_BOOL (!VCWD_ACCESS(filename, X_OK));
596584
case FS_EXISTS:
597-
RETURN_BOOL (!access (filename, F_OK));
585+
RETURN_BOOL (!VCWD_ACCESS(filename, F_OK));
598586
}
599587
#endif
600588

0 commit comments

Comments
 (0)