diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index a67b79542e16f..2870c14a2bd3e 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -151,10 +151,10 @@ private function init() { $this->cache = new FailedCache(); $this->rootPath = ''; } else { + $this->nonMaskedStorage = $ownerNode->getStorage(); if ($this->nonMaskedStorage instanceof Wrapper && $this->nonMaskedStorage->isWrapperOf($this)) { throw new \Exception('recursive share detected'); } - $this->nonMaskedStorage = $ownerNode->getStorage(); $this->sourcePath = $ownerNode->getPath(); $this->rootPath = $ownerNode->getInternalPath(); $this->storage = new PermissionsMask([