mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +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));
|
||||||
|
Loading…
Reference in New Issue
Block a user