diff options
author | Robin Appelman <robin@icewind.nl> | 2020-09-15 16:29:21 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-09-15 16:42:40 +0200 |
commit | 244fd6ae49dd1712d07bf64d1d27b8cfafe441ad (patch) | |
tree | 78ac43d24d995e8e98768f16afa8f24edc8c13e0 /apps | |
parent | c1ff011990294bf5eb431a82550be64a3775574f (diff) | |
download | nextcloud-server-244fd6ae49dd1712d07bf64d1d27b8cfafe441ad.tar.gz nextcloud-server-244fd6ae49dd1712d07bf64d1d27b8cfafe441ad.zip |
disable update checking for shared storages
update checking is already handled by the share source
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-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); } |