Re: fix to spaces in path
| From: | Greg Beaver | Date: | Sun, 03 Aug 2003 03:52:35 +0000 |
| Subject: | Re: fix to spaces in path | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19164@lists.php.net to get a copy of this message | ||
Hi,
Pierre-Alain Joye wrote:
[snip]
if this patch solves this "problem" [snip]
well, we should apply it. Before that, We have to check it and be sure it does not break anything around and works well on any platform (with spaces or not).Agreed.
If spaces do not work well on other platform, we'll run in troubles with this patch. I would not like to break other platform to allow win32 users the use of non portable pathnames.I also agree that this should support every platform, and if it doesn't, I will look into it, and see what's going on (I have linux, but not MacOSX, perhaps one of the Mac experts could test it?). I'm confident there will be no differences on OS, as the patch does not modify any of the OS-specific code (command-line reading and parsing is all done prior to any of the methods I patched) Today, after you posted, I tested a possibility on Windows to make sure I had caught all the cases. If I pass this to the installer: pear install "C:\Web Pages\chiara\phpdoc2\package.xml" "C:\Web Pages\chiara\php_parser4\package.xml" $argv is: array( 0 => 'pear', 1 => 'install', 2 => 'C:\Web Pages\chiara\phpdoc2\package.xml', 3 => 'C:\Web Pages\chiara\php_parser4\package.xml') This is all done in the PHP core before any user scripting reaches it. In addition, the PEAR_Command system doesn't attempt to split anything it receives, it just passes the values straight to the Installer->install() method, calling it once for each package.xml. If the unix command-line parsing doesn't split on quotes, then it won't work, but I am pretty sure it does considering that php -r "bunch of random stuff" passes the quoted things directly as 1 argument in both windows and unix :)
thanks for your work :) pierreMy pleasure, thank you for considering it on its merits. Regards, Greg