Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0b4

Doc Bug #7861 Filenames with spaces in them get their names changed when being moved
Submitted: 2006-06-11 02:40 UTC
From: pear dot bugtrack at telus dot net Assigned: cweiske
Status: Closed Package: HTTP_Upload (version 0.9.1)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-06-11 02:40 UTC] pear dot bugtrack at telus dot net (Ryan Sherrington)
Description: ------------ HTTP_Upload_File::moveTo() calls HTTP_Upload_File::setName('safe') by default, resulting in the following bug for files that are uploaded with spaces in the name and subsequently moved. Test script: --------------- $file = $http_Upload->getFiles('Filedata'); $file->getProp("name"); // "my file.jpg" $file->moveTo("myFiles/"); $file->getProp("name"); // "my_file.jpg" Temporary solution: $file = $http_Upload->getFiles('Filedata'); $file->setName('safe'); $file->getProp("name"); // "my_file.jpg" Expected result: ---------------- This is far from being a bug, there just needs to be better documentation for the moveTo() method, or alternatively setName('safe') needs to be called from within getFiles().

Comments

 [2007-04-04 16:27 UTC] wenz (Christian Wenz)
correct, should be documented better. I put it on the list.
 [2008-11-17 20:22 UTC] cweiske (Christian Weiske)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.