Skip to content

Commit 53de49b

Browse files
committed
also set nonMaskedStorage when shared setup fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 9c19541 commit 53de49b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/files_sharing/lib/SharedStorage.php

+4
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,18 @@ private function init() {
170170
} catch (NotFoundException $e) {
171171
// original file not accessible or deleted, set FailedStorage
172172
$this->storage = new FailedStorage(['exception' => $e]);
173+
$this->nonMaskedStorage = $this->storage;
173174
$this->cache = new FailedCache();
174175
$this->rootPath = '';
175176
} catch (NoUserException $e) {
176177
// sharer user deleted, set FailedStorage
177178
$this->storage = new FailedStorage(['exception' => $e]);
179+
$this->nonMaskedStorage = $this->storage;
178180
$this->cache = new FailedCache();
179181
$this->rootPath = '';
180182
} catch (\Exception $e) {
181183
$this->storage = new FailedStorage(['exception' => $e]);
184+
$this->nonMaskedStorage = $this->storage;
182185
$this->cache = new FailedCache();
183186
$this->rootPath = '';
184187
$this->logger->logException($e);
@@ -553,6 +556,7 @@ public function getWrapperStorage() {
553556
if (!$this->storage instanceof IStorage) {
554557
$e = new \Exception('Share source storage is null after initializing for share: ' . $this->getShare()->getId());
555558
$this->storage = new FailedStorage(['exception' => $e]);
559+
$this->nonMaskedStorage = $this->storage;
556560
$this->cache = new FailedCache();
557561
$this->rootPath = '';
558562
$this->logger->logException($e);

0 commit comments

Comments
 (0)