mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 18:25:13 +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);
|
$result = $this->sftp->get($this->path, false, $this->pos, $count);
|
||||||
if ($result === false) {
|
if (empty($result)) {
|
||||||
$this->eof = true;
|
$this->eof = true;
|
||||||
return false;
|
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