diff --git a/lib/Mount/GroupFolderStorage.php b/lib/Mount/GroupFolderStorage.php index 5f3845bc9..8236d7c76 100644 --- a/lib/Mount/GroupFolderStorage.php +++ b/lib/Mount/GroupFolderStorage.php @@ -24,10 +24,7 @@ use OC\Files\Cache\Scanner; use OC\Files\ObjectStore\ObjectStoreScanner; use OC\Files\ObjectStore\ObjectStoreStorage; -use OC\Files\Storage\Wrapper\Jail; use OC\Files\Storage\Wrapper\Quota; -use OC\Files\Storage\Wrapper\Wrapper; -use OCA\GroupFolders\ACL\ACLStorageWrapper; use OCP\Files\Cache\ICacheEntry; use OCP\IUser; use OCP\IUserSession; @@ -76,32 +73,10 @@ public function getCache($path = '', $storage = null) { } public function getScanner($path = '', $storage = null) { - // note that we explicitly don't used the passed in storage - // as we want to perform the scan on the underlying filesystem - // without any of the group folder permissions applied - - /** @var Wrapper $storage */ - $storage = $this->storage; - - // we want to scan without ACLs applied - if ($storage->instanceOfStorage(ACLStorageWrapper::class)) { - // sanity check in case the code setting up the wrapper hierarchy is changed without updating this - if (!$this->storage instanceof Jail) { - throw new \Exception("groupfolder storage layout changed unexpectedly"); - } - - $jailRoot = $this->storage->getUnjailedPath(''); - $aclStorage = $this->storage->getUnjailedStorage(); - - if (!$aclStorage instanceof ACLStorageWrapper) { - throw new \Exception("groupfolder storage layout changed unexpectedly"); - } - $storage = new Jail([ - 'storage' => $aclStorage->getWrapperStorage(), - 'root' => $jailRoot, - ]); + /** @var \OC\Files\Storage\Wrapper\Wrapper $storage */ + if (!$storage) { + $storage = $this; } - if ($storage->instanceOfStorage(ObjectStoreStorage::class)) { $storage->scanner = new ObjectStoreScanner($storage); } elseif (!isset($storage->scanner)) {