mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
SFTP: Don't do stat if lstat fails
This commit is contained in:
parent
ee84c4b41d
commit
56f87c8f3a
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user