cvs: php4 /win32 readdir.c

From: Date: Mon, 22 Apr 2002 22:14:41 +0000
Subject: cvs: php4 /win32 readdir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11318@lists.php.net to get a copy of this message
hirokawa Mon Apr 22 18:14:41 2002 EDT Modified files: /php4/win32 readdir.c Log: fixed access problem when japanese Shift_JIS character is used as directory name. Some characters in Shift_JIS are including 0x5c (slash) as second byte. Index: php4/win32/readdir.c diff -u php4/win32/readdir.c:1.6 php4/win32/readdir.c:1.7 --- php4/win32/readdir.c:1.6 Fri Feb 2 19:50:48 2001 +++ php4/win32/readdir.c Mon Apr 22 18:14:39 2002 @@ -29,7 +29,8 @@ filespec = malloc(strlen(dir) + 2 + 1); strcpy(filespec, dir); index = strlen(filespec) - 1; - if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\')) + if (index >= 0 && (filespec[index] == '/' || + (filespec[index] == '\\' && !IsDBCSLeadByte(filespec[index-1])))) filespec[index] = '\0'; strcat(filespec, "/*");

« previous php.cvs (#11318) next »