Re: cvs: php4 /win32 readdir.c
| From: | Jani Taskinen | Date: | Tue, 23 Apr 2002 03:17:30 +0000 |
| Subject: | Re: cvs: php4 /win32 readdir.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-11328@lists.php.net to get a copy of this message | ||
Should this fix be MFH to the PHP_4_2_0 branch?
And are there any bug reports which might have been
caused by this?
--Jani
On Mon, 22 Apr 2002, Rui Hirokawa wrote:
>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, "/*");
>
>
>
>
>
--