From: Ilia Alshanetsky Date: Sat, 20 Sep 2003 01:41:18 +0000 (+0000) Subject: MFH: Fixed bug #25583 (Incorrect handling of absolute path without drive). X-Git-Tag: php-4.3.4RC1~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fcd022dc58e05975b1fb6e3ae39c2a40472b3cc;p=php MFH: Fixed bug #25583 (Incorrect handling of absolute path without drive). --- diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 7c5f1c6925..c37e8a89e9 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -61,10 +61,10 @@ typedef unsigned short mode_t; * to account for volume name that is unique to NetWare absolute paths */ #define COPY_WHEN_ABSOLUTE(path) 2 -#define IS_ABSOLUTE_PATH(path, len) \ - (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || (IS_SLASH(path[0]) && IS_SLASH(path[1])))) #define IS_UNC_PATH(path, len) \ (len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1])) +#define IS_ABSOLUTE_PATH(path, len) \ + ((len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len))) || (len >= 1 && IS_SLASH(path[0]))) #elif defined(NETWARE) #ifdef HAVE_DIRENT_H