summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-12-18 15:55:46 +0100
committerRobin Appelman <robin@icewind.nl>2017-12-18 15:55:46 +0100
commit3fa13b48fcc8cc7695bf0d465a8d0cd87a5d82d9 (patch)
tree067834a7e42ba1bb82f07b9bf99c94718c14b3a0 /apps/files_external
parent97f80f558178b9fc7844148c13b41e52ee4c0c47 (diff)
downloadnextcloud-server-3fa13b48fcc8cc7695bf0d465a8d0cd87a5d82d9.tar.gz
nextcloud-server-3fa13b48fcc8cc7695bf0d465a8d0cd87a5d82d9.zip
handle exceptions in SMB::stat
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/SMB.php12
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 557dafda72c..66a03548ea7 100644
--- a/apps/files_external/lib/Lib/Storage/SMB.php
+++ b/apps/files_external/lib/Lib/Storage/SMB.php
@@ -205,12 +205,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();
}