Re: cvs: php4 /win32 readdir.c

From: Date: Tue, 23 Apr 2002 13:58:32 +0000
Subject: Re: cvs: php4 /win32 readdir.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11345@lists.php.net to get a copy of this message
On Tue, 23 Apr 2002, Rui Hirokawa wrote: > > 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. Please merge it then. Derick > > > 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> > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ----------------------------------------------------------------------- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B ----------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net -----------------------------------------------------------------------

« previous php.cvs (#11345) next »