aboutsummaryrefslogtreecommitdiffstats
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-04 15:23:11 +0100
commitc8a29ec94287855bcd02aad6e315a9656ba0183d (patch)
treeb82081da2f47cc5fe60db3e4a40860954b77d386
parent567757c793faed6925a538571a9e4f5b8b396bfd (diff)
downloadnextcloud-server-c8a29ec94287855bcd02aad6e315a9656ba0183d.tar.gz
nextcloud-server-c8a29ec94287855bcd02aad6e315a9656ba0183d.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>
-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 41bfceeab96..d05f0857ec9 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;
@@ -154,6 +155,10 @@ class ObjectTree extends CachingTree {
// 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) {