summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-18 11:57:03 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-18 11:57:03 +0100
commite1dbae14675a39d2678253eb628e55a674ce7b4d (patch)
treea1a07ccd38d62fbb290b5f3d9cbaff4bee35b9d3 /apps/files_sharing/lib
parent73d46afc3c5ef237cc8a5431aa1bef4686a7521b (diff)
downloadnextcloud-server-e1dbae14675a39d2678253eb628e55a674ce7b4d.tar.gz
nextcloud-server-e1dbae14675a39d2678253eb628e55a674ce7b4d.zip
Properly trigger testRemote after getting a 404 from remote fed share
Whenever a remote fed share's shareinfo call returns a 404, don't directly assume the storage is not available by throwing StorageNotAvailableException. We need to properly throw NotFoundException to trigger the later logic that calls testRemote() that verifies that the 404 is not from a broken server but really from an obsolete share.
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/external/storage.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 783eea43c62..ba7fba654a9 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -252,6 +252,9 @@ class Storage extends DAV implements ISharedStorage {
if ($e->getCode() === 401 || $e->getCode() === 403) {
throw new ForbiddenException();
}
+ if ($e->getCode() === 404) {
+ throw new NotFoundException();
+ }
// throw this to be on the safe side: the share will still be visible
// in the UI in case the failure is intermittent, and the user will
// be able to decide whether to remove it if it's really gone