Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55280 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70077 invoked from network); 7 Sep 2011 14:35:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2011 14:35:24 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:43695] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/10-03829-A21876E4 for ; Wed, 07 Sep 2011 10:35:23 -0400 Received: by yxk30 with SMTP id 30so4197353yxk.29 for ; Wed, 07 Sep 2011 07:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wFyT8gDBtcXhi2la+RAl4rWsH7VL79TI1ZLq7fd7+Cs=; b=aI2yD2SXJQYjeflF3nyVgMW7nOJb/NGZ1YzolPJ86Kl4KXse8aP2UQzU48sfgTyZUW kMiYa+EAAZfgxurgOPfuPCud4gdXHPAGacwxU8Sz12wKOiyfmdsUkFi4sGzh1aW7Hepr Z2JvCdrvhSFCjf4fEsulpHiBZjVM1GtaPcL5w= MIME-Version: 1.0 Received: by 10.146.225.7 with SMTP id x7mr4844898yag.10.1315405819671; Wed, 07 Sep 2011 07:30:19 -0700 (PDT) Received: by 10.147.182.15 with HTTP; Wed, 7 Sep 2011 07:30:19 -0700 (PDT) Date: Wed, 7 Sep 2011 16:30:19 +0200 Message-ID: To: Gustavo Lopes Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [PHP-CVS] 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: pierre.php@gmail.com (Pierre Joye) 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 wrot= e: > Em Wed, 07 Sep 2011 13:41:45 +0100, Hannes Magnusson > escreveu: > >> On Wed, Sep 7, 2011 at 14:33, Pierre Joye wrote: >>> >>> pajoye =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 Wed, 07 Sep 2011 12:33:22 +0000 >>> >>> Revision: http://svn.php.net/viewvc?view=3Drevision&revision=3D316345 >>> >>> Log: >>> - reject paths with trainling spaces using the very good new zend arg >>> >>> Changed paths: >>> =A0 _U =A0php/php-src/branches/PHP_5_4/Zend/tests/bug52041.phpt >>> =A0 U =A0 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 > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org