diff options
Diffstat (limited to 'apps/files_sharing/lib/SharedStorage.php')
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 1735cab43f6..43896679a31 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -33,6 +33,8 @@ namespace OCA\Files_Sharing; use OC\Files\Cache\FailedCache; +use OC\Files\Cache\LazyWatcher; +use OC\Files\Cache\NullWatcher; use OC\Files\Filesystem; use OC\Files\Storage\FailedStorage; use OC\Files\Storage\Wrapper\PermissionsMask; @@ -126,7 +128,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto try { Filesystem::initMountPoints($this->superShare->getShareOwner()); $sourcePath = $this->ownerView->getPath($this->superShare->getNodeId()); - list($this->nonMaskedStorage, $this->rootPath) = $this->ownerView->resolvePath($sourcePath); + [$this->nonMaskedStorage, $this->rootPath] = $this->ownerView->resolvePath($sourcePath); $this->storage = new PermissionsMask([ 'storage' => $this->nonMaskedStorage, 'mask' => $this->superShare->getPermissions() @@ -160,7 +162,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto if ($class === '\OC\Files\Storage\Common') { return true; } - if (in_array($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage'])) { + if (in_array($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage', '\OCP\Files\IHomeStorage'])) { return false; } return parent::instanceOfStorage($class); @@ -223,7 +225,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto } /** @var IStorage $storage */ /** @var string $internalPath */ - list($storage, $internalPath) = $this->resolvePath($path); + [$storage, $internalPath] = $this->resolvePath($path); return $storage->isReadable($internalPath); } @@ -397,6 +399,11 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto return $this->superShare->getShareOwner(); } + public function getWatcher($path = '', $storage = null) { + // cache updating is handled by the share source + return new NullWatcher(); + } + /** * unshare complete storage, also the grouped shares * @@ -417,7 +424,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto */ public function acquireLock($path, $type, ILockingProvider $provider) { /** @var \OCP\Files\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->resolvePath($path); + [$targetStorage, $targetInternalPath] = $this->resolvePath($path); $targetStorage->acquireLock($targetInternalPath, $type, $provider); // lock the parent folders of the owner when locking the share as recipient if ($path === '') { @@ -433,7 +440,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto */ public function releaseLock($path, $type, ILockingProvider $provider) { /** @var \OCP\Files\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->resolvePath($path); + [$targetStorage, $targetInternalPath] = $this->resolvePath($path); $targetStorage->releaseLock($targetInternalPath, $type, $provider); // unlock the parent folders of the owner when unlocking the share as recipient if ($path === '') { @@ -449,7 +456,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto */ public function changeLock($path, $type, ILockingProvider $provider) { /** @var \OCP\Files\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->resolvePath($path); + [$targetStorage, $targetInternalPath] = $this->resolvePath($path); $targetStorage->changeLock($targetInternalPath, $type, $provider); } |