also set nonMaskedStorage when shared setup fails

Signed-off-by: Robin Appelman <robin@icewind.nl>
share-null-source
Robin Appelman 2 years ago committed by Vincent Petry (Rebase PR Action)
parent 21f09adf44
commit 0f617e70a3

@ -170,15 +170,18 @@ 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->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);
@ -553,6 +556,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
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);

Loading…
Cancel
Save