cvs: pear /File File.php
| From: | Michael Wallner | Date: | Fri, 30 Sep 2005 10:47:10 +0000 |
| Subject: | cvs: pear /File File.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35165@lists.php.net to get a copy of this message | ||
mike Fri Sep 30 06:47:10 2005 EDT
Modified files:
/pear/File File.php
Log:
- fix Bug #5045 File::stripTrailingSeparators should not rtrim the path "/" on linux
http://cvs.php.net/diff.php/pear/File/File.php?r1=1.32&r2=1.33&ty=u
Index: pear/File/File.php
diff -u pear/File/File.php:1.32 pear/File/File.php:1.33
--- pear/File/File.php:1.32 Mon Sep 12 10:36:26 2005
+++ pear/File/File.php Fri Sep 30 06:47:08 2005
@@ -19,7 +19,7 @@
* @author Michael Wallner <mike@php.net>
* @copyright 2002-2005 The Authors
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: File.php,v 1.32 2005/09/12 14:36:26 dufuz Exp $
+ * @version CVS: $Id: File.php,v 1.33 2005/09/30 10:47:08 mike Exp $
* @link http://pear.php.net/package/File
*/
@@ -472,6 +472,9 @@
*/
function stripTrailingSeparators($path, $separator = DIRECTORY_SEPARATOR)
{
+ if ($path === $separator) {
+ return $path;
+ }
return rtrim($path, $separator);
}
@@ -480,6 +483,9 @@
*/
function stripLeadingSeparators($path, $separator = DIRECTORY_SEPARATOR)
{
+ if ($path === $separator) {
+ return $path;
+ }
return ltrim($path, $separator);
}