mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
stat() and lstat() ignore false output from _stat()
Thanks Fluffycloud!
This commit is contained in:
parent
31ad9aacbd
commit
c7d6492f43
@ -886,6 +886,9 @@ class Net_SFTP extends Net_SSH2 {
|
||||
}
|
||||
|
||||
$stat = $this->_stat($filename, NET_SFTP_STAT);
|
||||
if ($stat === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pwd = $this->pwd;
|
||||
$stat['type'] = $this->chdir($filename) ?
|
||||
@ -918,6 +921,9 @@ class Net_SFTP extends Net_SSH2 {
|
||||
|
||||
$lstat = $this->_stat($filename, NET_SFTP_LSTAT);
|
||||
$stat = $this->_stat($filename, NET_SFTP_STAT);
|
||||
if ($stat === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($lstat != $stat) {
|
||||
return array_merge($lstat, array('type' => NET_SFTP_TYPE_SYMLINK));
|
||||
@ -1958,4 +1964,4 @@ class Net_SFTP extends Net_SSH2 {
|
||||
$this->pwd = false;
|
||||
parent::_disconnect($reason);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user