return failed cache if the shared storage failed to setup

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-03-20 18:31:34 +01:00 committed by Lukas Reschke
parent 4652923011
commit 0d20865548
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 4 additions and 0 deletions

View 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;
}