cvs: php4(PHP_4_2_0) /win32 readdir.c TSRM tsrm_virtual_cwd.c

From: Date: Tue, 23 Apr 2002 14:55:10 +0000
Subject: cvs: php4(PHP_4_2_0) /win32 readdir.c TSRM tsrm_virtual_cwd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11346@lists.php.net to get a copy of this message
hirokawa Tue Apr 23 10:55:10 2002 EDT Modified files: (Branch: PHP_4_2_0) /TSRM tsrm_virtual_cwd.c /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: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.27 TSRM/tsrm_virtual_cwd.c:1.27.2.1 --- TSRM/tsrm_virtual_cwd.c:1.27 Tue Dec 11 10:16:20 2001 +++ TSRM/tsrm_virtual_cwd.c Tue Apr 23 10:55:09 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.27 2001/12/11 15:16:20 sebastian Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.27.2.1 2002/04/23 14:55:09 hirokawa Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -68,7 +68,8 @@ #endif #ifdef TSRM_WIN32 -#define tsrm_strtok_r(a,b,c) strtok((a),(b)) +#include <tchar.h> +#define tsrm_strtok_r(a,b,c) _tcstok((a),(b)) #define TOKENIZER_STRING "/\\" static int php_check_dots(const char *element, int n) Index: php4/win32/readdir.c diff -u php4/win32/readdir.c:1.6 php4/win32/readdir.c:1.6.8.1 --- php4/win32/readdir.c:1.6 Fri Feb 2 19:50:48 2001 +++ php4/win32/readdir.c Tue Apr 23 10:55:10 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 (#11346) next »