mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
handle invalid request exceptions when seeking
This commit is contained in:
parent
40e384e8ba
commit
6629a780b0
1 changed files with 6 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
namespace Icewind\SMB;
|
||||
|
||||
use Icewind\SMB\Exception\InvalidRequestException;
|
||||
use Icewind\Streams\File;
|
||||
|
||||
class NativeStream implements File {
|
||||
|
|
@ -80,7 +81,11 @@ class NativeStream implements File {
|
|||
|
||||
public function stream_seek($offset, $whence = SEEK_SET) {
|
||||
$this->eof = false;
|
||||
try {
|
||||
return $this->state->lseek($this->handle, $offset, $whence) !== false;
|
||||
} catch (InvalidRequestException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function stream_stat() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue