mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 04:23:34 +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);
|
$lstat = $this->_stat($filename, NET_SFTP_LSTAT);
|
||||||
$stat = $this->_stat($filename, NET_SFTP_STAT);
|
if ($lstat === false) {
|
||||||
if ($stat === false) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$stat = $this->_stat($filename, NET_SFTP_STAT);
|
||||||
|
|
||||||
if ($lstat != $stat) {
|
if ($lstat != $stat) {
|
||||||
return array_merge($lstat, array('type' => NET_SFTP_TYPE_SYMLINK));
|
return array_merge($lstat, array('type' => NET_SFTP_TYPE_SYMLINK));
|
||||||
@ -2154,4 +2154,4 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
$this->pwd = false;
|
$this->pwd = false;
|
||||||
parent::_disconnect($reason);
|
parent::_disconnect($reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user