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

Bug #5045 File::stripTrailingSeparators should not rtrim the path "/" on linux
Submitted: 2005-08-09 23:03 UTC
From: simeonf at gmail dot com Assigned: mike
Status: Closed Package: File
PHP Version: 4.3.10 OS: Linux
Roadmaps: 1.3.0a1    

 [2005-08-09 23:03 UTC] simeonf at gmail dot com
Description: ------------ On linux, "/" is a valid path representing the root. File::stripTrailingSeparators should not rtrim the path if it consists of "/" and $seperator = "/". For all other paths, "/my/path/to/dir/foo/" is the same as "/my/path/to/dir/foo", but "/" != "". Test script: --------------- <?php include "File.php"; var_dump(File::stripTrailingSeparators("/")); ?> Expected result: ---------------- string(1) "/" Actual result: -------------- string(0) ""


 [2005-09-30 05:03 UTC] dufuz
Mike: Maybe we should just move strip(trailing|leading)seperator over to File_Util and do the OS check there?
 [2005-09-30 10:48 UTC] mike
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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. Nah, it's deprecated anyways.