summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-04-21 21:17:33 +0200
committerAnatol Belski <ab@php.net>2016-04-23 18:55:52 +0200
commite0edb25cf2decd41f897100ebd4330c8f9b8a15e (patch)
treee57995491f4629a918e594fd222f6395b919b3c7 /main
parent589d0e0f187ff82f90110057f624c958f0d3ec86 (diff)
downloadphp-git-e0edb25cf2decd41f897100ebd4330c8f9b8a15e.tar.gz
Fixed bug #72035 php-cgi.exe fails to run scripts relative to drive root
Diffstat (limited to 'main')
-rw-r--r--main/fopen_wrappers.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index e4d5688de3..ab51e5e58b 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -505,6 +505,13 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length,
(IS_SLASH(filename[1]) ||
((filename[1] == '.') && IS_SLASH(filename[2])))) ||
IS_ABSOLUTE_PATH(filename, filename_length) ||
+#if PHP_WIN32
+ /* This should count as an absolute local path as well, however
+ IS_ABSOLUTE_PATH doesn't care about this path form till now. It
+ might be a big thing to extend, thus just a local handling for
+ now. */
+ filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
+#endif
!path ||
!*path) {
if (tsrm_realpath(filename, resolved_path)) {