diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-12-18 22:31:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-18 22:31:05 +0100 |
commit | b01d20c0d7b76dc04fcbfa027c51b14d740dc67e (patch) | |
tree | bee60c49858837c978fe45ffe82fa55967a2ebe0 /apps/files_external | |
parent | e294323df2852afb8615d99093b276e924333071 (diff) | |
parent | 3fa13b48fcc8cc7695bf0d465a8d0cd87a5d82d9 (diff) | |
download | nextcloud-server-b01d20c0d7b76dc04fcbfa027c51b14d740dc67e.tar.gz nextcloud-server-b01d20c0d7b76dc04fcbfa027c51b14d740dc67e.zip |
Merge pull request #7556 from nextcloud/smb-stat-exception
handle exceptions in SMB::stat
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 67ba2ae2c54..d8bbe8c4718 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(); } |