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

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));