]> source.dussan.org Git - nextcloud-server.git/commitdiff
return failed cache if the shared storage failed to setup
authorRobin Appelman <robin@icewind.nl>
Mon, 20 Mar 2017 17:31:34 +0000 (18:31 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 22 May 2017 21:16:25 +0000 (23:16 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/lib/SharedStorage.php

index 77bbb2f227b2dc129d34719363a09238ad3a1e82..2cfba16c686eaaf7b3ff062e3bca8f7aba04fc82 100644 (file)
@@ -31,6 +31,7 @@
 
 namespace OCA\Files_Sharing;
 
+use OC\Files\Cache\FailedCache;
 use OC\Files\Filesystem;
 use OC\Files\Storage\Wrapper\PermissionsMask;
 use OC\Files\Storage\FailedStorage;
@@ -353,6 +354,9 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
                if (!$storage) {
                        $storage = $this;
                }
+               if ($this->storage instanceof FailedStorage) {
+                       return new FailedCache();
+               }
                $this->cache = new \OCA\Files_Sharing\Cache($storage, $this->getSourceRootInfo(), $this->superShare);
                return $this->cache;
        }