return false if stream_stat fails

This commit is contained in:
Robin Appelman 2016-03-09 13:06:16 +01:00
commit 7aa7b44b7c

View file

@ -7,6 +7,7 @@
namespace Icewind\SMB;
use Icewind\SMB\Exception\Exception;
use Icewind\SMB\Exception\InvalidRequestException;
use Icewind\Streams\File;
@ -89,7 +90,11 @@ class NativeStream implements File {
}
public function stream_stat() {
return $this->state->fstat($this->handle);
try {
return $this->state->fstat($this->handle);
} catch (Exception $e) {
return false;
}
}
public function stream_tell() {