"Fixes #4377, Folder class bug for non-existent path"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6602 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-03-26 04:05:05 +00:00
parent fa787aa82b
commit 657c28403a
2 changed files with 10 additions and 5 deletions

View file

@ -110,8 +110,10 @@ class Folder extends Object{
if (!$this->isAbsolute($path)) {
$path = realpath($path);
}
if (!empty($path)) {
$this->cd($path);
}
}
/**
* Return current path.
*

View file

@ -117,6 +117,9 @@ class FolderTest extends UnitTestCase {
$result = $Folder->delete();
$this->assertTrue($result);
$Folder =& new Folder('non-existent');
$result = $Folder->pwd();
$this->assertNull($result);
}
function testRealPathForWebroot() {