diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 67ba2ae2c5..d8bbe8c471 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -207,12 +207,14 @@ class SMB extends Common implements INotifyStorage { return $result; } - /** - * @param string $path - * @return array - */ public function stat($path) { - $result = $this->formatInfo($this->getFileInfo($path)); + try { + $result = $this->formatInfo($this->getFileInfo($path)); + } catch (ForbiddenException $e) { + return false; + } catch (NotFoundException $e) { + return false; + } if ($this->remoteIsShare() && $this->isRootDir($path)) { $result['mtime'] = $this->shareMTime(); }