Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/tests/bug52041.phpt branches/PHP_5_4/Zend/zend_API.c
branches/PHP_5_4/ext/standard/tests/file/005_variation2-win32.phpt branches/PHP_5_4/ext/standard/tests/file/copy_variation3-win3

From: Date: Wed, 07 Sep 2011 14:30:19 +0000
Subject: Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/tests/bug52041.phpt branches/PHP_5_4/Zend/zend_API.c
branches/PHP_5_4/ext/standard/tests/file/005_variation2-win32.phpt branches/PHP_5_4/ext/standard/tests/file/copy_variation3-win3
Groups: php.internals 
Request: Send a blank email to internals+get-55280@lists.php.net to get a copy of this message
hi, the main problem is that the (stupid) windows filesystem APIs consider " foo", "foo " as being the same than "foo". It has caused all kind of bad effects and we added checks in some areas already in 5.3. Now that 5.4 has a "p" parameter we can simply cleanup the given paths before passing it to the API. I realized that unix does not raise a warning and simply check for the actual path " foo" (in its full form), so this commit breaks the tests on unix right now :P. I will revert the tests change later today and go with another solution, to escape the trailing spaces instead of rejecting them. That should then behave the same way than on unix. About: CreateDirectoryW(L"\\\\?\\C:\\users\\gustavo.lopes\\ ",NULL); It is a totally different thing as \\?\ paths are not treated the same way by the underlying API (see msdn for the various path forms and how they work, don't have the link at hand). Cheers, On Wed, Sep 7, 2011 at 3:28 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote: > Em Wed, 07 Sep 2011 13:41:45 +0100, Hannes Magnusson > <hannes.magnusson@gmail.com> escreveu: > >> On Wed, Sep 7, 2011 at 14:33, Pierre Joye <pajoye@php.net> wrote: >>> >>> pajoye                                   Wed, 07 Sep 2011 12:33:22 >>> +0000 >>> >>> Revision: >>> http://svn.php.net/viewvc?view=revision&revision=316345 >>> >>> Log: >>> - reject paths with trainling spaces using the very good new zend arg >>> >>> Changed paths: >>>   _U  php/php-src/branches/PHP_5_4/Zend/tests/bug52041.phpt >>>   U   php/php-src/branches/PHP_5_4/Zend/zend_API.c >> >> >> Windows can mount other filesystems that do allow folders to be called >> " ". Please revert this. >> > > You don't need other filesystems. I tried (where C: is a NTFS volume): > > CreateDirectoryW(L"\\\\?\\C:\\users\\gustavo.lopes\\ ",NULL); > > and it created a directory with " " as its name. > > > -- > Gustavo Lopes > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#55280) next »