From a12ec5ec77e0025157af8d9e1401f0f2a43a5c3a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Mar 2017 15:01:23 +0100 Subject: set cache to failedcache when shared storage init fails Signed-off-by: Robin Appelman --- apps/files_sharing/lib/SharedStorage.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/files_sharing/lib/SharedStorage.php') diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 2cfba16c686..ddbc9b8a898 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -124,13 +124,16 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto } catch (NotFoundException $e) { // original file not accessible or deleted, set FailedStorage $this->storage = new FailedStorage(['exception' => $e]); + $this->cache = new FailedCache(); $this->rootPath = ''; } catch (NoUserException $e) { // sharer user deleted, set FailedStorage $this->storage = new FailedStorage(['exception' => $e]); + $this->cache = new FailedCache(); $this->rootPath = ''; } catch (\Exception $e) { $this->storage = new FailedStorage(['exception' => $e]); + $this->cache = new FailedCache(); $this->rootPath = ''; $this->logger->logException($e); } -- cgit v1.2.3