summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-07-13 18:28:53 +0200
committerVincent Petry <pvince81@owncloud.com>2015-07-13 18:28:53 +0200
commitf62d94c4ff353218c5a012066216080507821b48 (patch)
tree743efc43e8f22b3da425eb99fb0a1f709afe3a4c /lib
parente18d0e26f6b5fbef555acacb7d1ec7adbff1c50e (diff)
downloadnextcloud-server-f62d94c4ff353218c5a012066216080507821b48.tar.gz
nextcloud-server-f62d94c4ff353218c5a012066216080507821b48.zip
Throw StorageNotAvailable if propfind on root failed
If PROPFIND fails with 404 or 405 on the remote share root, it means the storage is not available. Throw StorageNotAvailable is such case.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/dav.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index d67e6b9f97e..e02f971b38b 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -760,7 +760,11 @@ class DAV extends Common {
return $remoteMtime > $time;
}
} catch (ClientHttpException $e) {
- if ($e->getHttpStatus() === 404) {
+ if ($e->getHttpStatus() === 404 || $e->getHttpStatus() === 405) {
+ if ($path === '') {
+ // if root is gone it means the storage is not available
+ throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
+ }
return false;
}
$this->convertException($e);