Re: cvs: php4 /win32 readdir.c
| From: | Rui Hirokawa | Date: | Tue, 23 Apr 2002 14:02:33 +0000 |
| Subject: | Re: cvs: php4 /win32 readdir.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-11344@lists.php.net to get a copy of this message | ||
Yes, it should be also applied for PHP_4_2_0 branch.
This problem is found in japanese PHP users mailing list,
and it is not reported on bugs.php.net.
On Tue, 23 Apr 2002 06:17:30 +0300 (EEST)
Jani Taskinen <sniper@iki.fi> wrote:
>
> 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, "/*");
> >
> >
> >
> >
> >
>
> --
--
-----------------------------------------------------
Rui Hirokawa <rui_hirokawa@ybb.ne.jp>
<hirokawa@php.net>