mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
SFTP_Stream: Better EOF detection
$result will be false on error and '' if the EOF is reached.
This commit is contained in:
parent
c5bd12dd14
commit
05e832d14f
@ -256,7 +256,7 @@ class Net_SFTP_Stream {
|
||||
//}
|
||||
|
||||
$result = $this->sftp->get($this->path, false, $this->pos, $count);
|
||||
if ($result === false) {
|
||||
if (empty($result)) {
|
||||
$this->eof = true;
|
||||
return false;
|
||||
}
|
||||
@ -659,4 +659,4 @@ class Net_SFTP_Stream {
|
||||
}
|
||||
}
|
||||
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
|
Loading…
Reference in New Issue
Block a user