diff options
| author | Andi Gutmans <andi@php.net> | 2000-06-16 01:14:08 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2000-06-16 01:14:08 +0000 |
| commit | b73a6f883d5d2061f25969a96385e707aa455a88 (patch) | |
| tree | e8adea196373c353b4db2f36269b7b1e6dbff8c8 | |
| parent | 70b8e3e8f60ab5316859bcfb3bf12866adbce554 (diff) | |
| download | php-git-b73a6f883d5d2061f25969a96385e707aa455a88.tar.gz | |
- Last patch for tonight. A more optimized way to check for absolute path
- in Windows. This should be fixed to use the virtual cwd macro for
- ABSOLUTE_DIR() but I need to have time to understand the logic first
| -rw-r--r-- | main/fopen_wrappers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 0291ef7cbb..fb39544f1f 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -327,7 +327,8 @@ PHPAPI FILE *php_fopen_primary_script(void) #endif #ifdef PHP_WIN32 if (PG(doc_root) && path_info && (IS_SLASH(*PG(doc_root)) - || strstr(PG(doc_root),":\\") || strstr(PG(doc_root),":/"))) { + /* Check for absolute path. This should also use virtual cwd macros */ + || (PG(doc_root)[1] == ':' && IS_SLASH(PG(doc_root)[2]))) { #else if (PG(doc_root) && path_info && IS_SLASH(*PG(doc_root))) { #endif |
