aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-02-15 17:52:11 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-04 21:34:54 +0100
commitb8442935361703ce6cd9e17ec50d64584cd35673 (patch)
tree246d7fcdfdbb3087e8f35f3088062ea9d1f8e1f1 /apps/files_external/lib/Lib
parentb0fe408d1f08958d1d00c98810675cc8a70df686 (diff)
downloadnextcloud-server-b8442935361703ce6cd9e17ec50d64584cd35673.tar.gz
nextcloud-server-b8442935361703ce6cd9e17ec50d64584cd35673.zip
catch notfound and forbidden exception in smb::getmetadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib/Lib')
-rw-r--r--apps/files_external/lib/Lib/Storage/SMB.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php
index 952f6c08931..bc065b24552 100644
--- a/apps/files_external/lib/Lib/Storage/SMB.php
+++ b/apps/files_external/lib/Lib/Storage/SMB.php
@@ -556,7 +556,13 @@ class SMB extends Common implements INotifyStorage {
}
public function getMetaData($path) {
- $fileInfo = $this->getFileInfo($path);
+ try {
+ $fileInfo = $this->getFileInfo($path);
+ } catch (NotFoundException $e) {
+ return null;
+ } catch (ForbiddenException $e) {
+ return null;
+ }
if (!$fileInfo) {
return null;
}