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    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2005-09-30 10:48 UTC
Package:
Bug Type:
Summary:
From: simeonf at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [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) ""

Comments

 [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 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. Nah, it's deprecated anyways.