summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-11-30 21:29:06 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-12-06 09:15:43 +0100
commit7e6dd024412437402bd03b2854111ff2185a481c (patch)
treeaaf9a183c6b6b4a76be067be78dbcbb9d65b5c98 /apps
parentf3b9b213ebfb7cb5a697ba6eaa056675f40aac85 (diff)
downloadnextcloud-server-7e6dd024412437402bd03b2854111ff2185a481c.tar.gz
nextcloud-server-7e6dd024412437402bd03b2854111ff2185a481c.zip
A failed storage is a not available storage
We have to double check. Since getting the info of the root returns a generic entry. But actually the stroage is not available. Else we get very weird sync and web behavior. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/ObjectTree.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php
index acc6dcc3be3..f37ffc19e29 100644
--- a/apps/dav/lib/Connector/Sabre/ObjectTree.php
+++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php
@@ -29,6 +29,7 @@
namespace OCA\DAV\Connector\Sabre;
+use OC\Files\Storage\FailedStorage;
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
@@ -158,6 +159,10 @@ class ObjectTree extends \Sabre\DAV\Tree {
// read from cache
try {
$info = $this->fileView->getFileInfo($path);
+
+ if ($info->getStorage()->instanceOfStorage(FailedStorage::class)) {
+ throw new StorageNotAvailableException();
+ }
} catch (StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available');
} catch (StorageInvalidException $e) {