SFTP: Don't do stat if lstat fails

This commit is contained in:
terrafrost 2013-03-07 10:56:24 -06:00
parent ee84c4b41d
commit 56f87c8f3a
1 changed files with 3 additions and 3 deletions

View File

@ -913,10 +913,10 @@ class Net_SFTP extends Net_SSH2 {
}
$lstat = $this->_stat($filename, NET_SFTP_LSTAT);
$stat = $this->_stat($filename, NET_SFTP_STAT);
if ($stat === false) {
if ($lstat === false) {
return false;
}
$stat = $this->_stat($filename, NET_SFTP_STAT);
if ($lstat != $stat) {
return array_merge($lstat, array('type' => NET_SFTP_TYPE_SYMLINK));
@ -2154,4 +2154,4 @@ class Net_SFTP extends Net_SSH2 {
$this->pwd = false;
parent::_disconnect($reason);
}
}
}