Skip to content

Commit

Permalink
also set nonMaskedStorage when shared setup fails
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Sep 16, 2022
1 parent 9c19541 commit 53de49b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,18 @@ private function init() {
} catch (NotFoundException $e) {
// original file not accessible or deleted, set FailedStorage
$this->storage = new FailedStorage(['exception' => $e]);
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
} catch (NoUserException $e) {
// sharer user deleted, set FailedStorage
$this->storage = new FailedStorage(['exception' => $e]);
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
} catch (\Exception $e) {
$this->storage = new FailedStorage(['exception' => $e]);
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
$this->logger->logException($e);
Expand Down Expand Up @@ -553,6 +556,7 @@ public function getWrapperStorage() {
if (!$this->storage instanceof IStorage) {
$e = new \Exception('Share source storage is null after initializing for share: ' . $this->getShare()->getId());
$this->storage = new FailedStorage(['exception' => $e]);
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
$this->logger->logException($e);
Expand Down

0 comments on commit 53de49b

Please sign in to comment.