Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-09-15 18:01:33 +0300
committerRobin Appelman <robin@icewind.nl>2020-09-16 14:49:07 +0300
commitcfde74442c67b9a6e639536536c18e4c6d4f7a0e (patch)
treec2febb15ec88d7e3480cceac088c4266ba7b34e2 /apps/files_sharing/lib
parent244fd6ae49dd1712d07bf64d1d27b8cfafe441ad (diff)
optimize View::getPath if we already know the storage id
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index 43896679a31..7625c0bba44 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -33,7 +33,6 @@
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;
@@ -127,11 +126,12 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
$this->initialized = true;
try {
Filesystem::initMountPoints($this->superShare->getShareOwner());
- $sourcePath = $this->ownerView->getPath($this->superShare->getNodeId());
+ $storageId = $this->superShare->getNodeCacheEntry() ? $this->superShare->getNodeCacheEntry()->getStorageId() : null;
+ $sourcePath = $this->ownerView->getPath($this->superShare->getNodeId(), $storageId);
[$this->nonMaskedStorage, $this->rootPath] = $this->ownerView->resolvePath($sourcePath);
$this->storage = new PermissionsMask([
'storage' => $this->nonMaskedStorage,
- 'mask' => $this->superShare->getPermissions()
+ 'mask' => $this->superShare->getPermissions(),
]);
} catch (NotFoundException $e) {
// original file not accessible or deleted, set FailedStorage
@@ -379,7 +379,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
if (!$storage) {
$storage = $this;
}
- $sourceRoot = $this->getSourceRootInfo();
+ $sourceRoot = $this->getSourceRootInfo();
if ($this->storage instanceof FailedStorage) {
return new FailedCache();
}
@@ -467,7 +467,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
// shares do not participate in availability logic
return [
'available' => true,
- 'last_checked' => 0
+ 'last_checked' => 0,
];
}