From f2e981e269052db73765be3eb1c97aa69f868d5e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Mar 2017 18:02:21 +0100 Subject: [PATCH] also set nonmaskedstorage in error cases Signed-off-by: Robin Appelman --- apps/files_sharing/lib/SharedStorage.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 560c195d8baa5..77bbb2f227b2d 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -98,6 +98,7 @@ public function __construct($arguments) { private function getSourceRootInfo() { if (is_null($this->sourceRootInfo)) { if (is_null($this->superShare->getNodeCacheEntry())) { + $this->init(); $this->sourceRootInfo = $this->nonMaskedStorage->getCache()->get($this->rootPath); } else { $this->sourceRootInfo = $this->superShare->getNodeCacheEntry(); @@ -132,6 +133,10 @@ private function init() { $this->rootPath = ''; $this->logger->logException($e); } + + if (!$this->nonMaskedStorage) { + $this->nonMaskedStorage = $this->storage; + } } /**