svn: /pear/packages/File/trunk/File/ Util.php

From: Date: Sat, 12 Mar 2011 16:45:50 +0000
Subject: svn: /pear/packages/File/trunk/File/ Util.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-61413@lists.php.net to get a copy of this message
dufuz Sat, 12 Mar 2011 16:45:50 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=309134 Log: Fixed Bug #16425: File_Util::isAbsolute(), Windows can resolve /foo/bar as absolute [dufuz] Windows can deal with /foo/bar paths as they automagically resolve to C:\foo\bar Bug: http://pear.php.net/bugs/16425 (unknown) Changed paths: U pear/packages/File/trunk/File/Util.php Modified: pear/packages/File/trunk/File/Util.php =================================================================== --- pear/packages/File/trunk/File/Util.php 2011-03-12 12:02:38 UTC (rev 309133) +++ pear/packages/File/trunk/File/Util.php 2011-03-12 16:45:50 UTC (rev 309134) @@ -180,7 +180,7 @@ return false; } if (FILE_WIN32) { - return preg_match('/^[a-zA-Z]:(\\\|\/)/', $path); + return (($path{0} == '/') || preg_match('/^[a-zA-Z]:(\\\|\/)/', $path)); } return ($path{0} == '/') || ($path{0} == '~'); }

« previous php.pear.cvs (#61413) next »