/home and /home/ should return the same thing for rawlist() and nlist() (thanks pioyu!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@166 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2011-06-20 03:23:44 +00:00
parent 497df88951
commit 3da6c0d608

View File

@ -483,6 +483,8 @@ class Net_SFTP extends Net_SSH2 {
$dir = dirname($dir);
}
$dir = rtrim($dir, '/');
if ($dir == '.' || $dir == $this->pwd) {
return $this->pwd . $file;
}
@ -632,7 +634,7 @@ class Net_SFTP extends Net_SSH2 {
return false;
}
$dir = $this->_realpath($dir);
$dir = $this->_realpath($dir . '/');
if ($dir === false) {
return false;
}