Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-18 13:57:03 +0300
committerVincent Petry <pvince81@owncloud.com>2016-02-18 13:57:03 +0300
commite1dbae14675a39d2678253eb628e55a674ce7b4d (patch)
treea1a07ccd38d62fbb290b5f3d9cbaff4bee35b9d3
parent73d46afc3c5ef237cc8a5431aa1bef4686a7521b (diff)
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.
-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