diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-02-18 15:41:01 +0100 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-03-07 07:21:20 +0000 |
commit | 4ca6c3af7ab2aa898fdf0cf6c240adeaee2645ca (patch) | |
tree | bce77a534947a02a88be4ac4eea4ce64c4fcba93 /lib | |
parent | cab4f8eca32c1a677c5e4d6f60fcf597645501af (diff) | |
download | nextcloud-server-4ca6c3af7ab2aa898fdf0cf6c240adeaee2645ca.tar.gz nextcloud-server-4ca6c3af7ab2aa898fdf0cf6c240adeaee2645ca.zip |
fix: Use proper path for quota fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 456f804ee56..1bd131303e3 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -164,7 +164,7 @@ class View { * get path relative to the root of the view * * @param string $path - * @return string + * @return ?string */ public function getRelativePath($path) { $this->assertPathLength($path); @@ -1241,7 +1241,7 @@ class View { * get the path relative to the default root for hook usage * * @param string $path - * @return string + * @return ?string */ private function getHookPath($path) { if (!Filesystem::getView()) { diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 0004edf5b8f..8d708118b96 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -473,7 +473,7 @@ class OC_Helper { if (!$view) { throw new \OCP\Files\NotFoundException(); } - $fullPath = $view->getAbsolutePath($path); + $fullPath = Filesystem::normalizePath($view->getAbsolutePath($path)); $cacheKey = $fullPath. '::' . ($includeMountPoints ? 'include' : 'exclude'); if ($useCache) { @@ -624,9 +624,9 @@ class OC_Helper { /** @var ICacheFactory $cacheFactory */ $cacheFactory = \OC::$server->get(ICacheFactory::class); $memcache = $cacheFactory->createLocal('storage_info'); - $cacheKey = Filesystem::normalizePath($absolutePath) . '::'; - $memcache->remove($cacheKey . 'include'); - $memcache->remove($cacheKey . 'exclude'); + $cacheKeyPrefix = Filesystem::normalizePath($absolutePath) . '::'; + $memcache->remove($cacheKeyPrefix . 'include'); + $memcache->remove($cacheKeyPrefix . 'exclude'); } /** |