diff options
Diffstat (limited to 'lib/private/legacy/OC_Helper.php')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index c2036c7b863..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) { @@ -620,6 +620,15 @@ class OC_Helper { ]; } + public static function clearStorageInfo(string $absolutePath): void { + /** @var ICacheFactory $cacheFactory */ + $cacheFactory = \OC::$server->get(ICacheFactory::class); + $memcache = $cacheFactory->createLocal('storage_info'); + $cacheKeyPrefix = Filesystem::normalizePath($absolutePath) . '::'; + $memcache->remove($cacheKeyPrefix . 'include'); + $memcache->remove($cacheKeyPrefix . 'exclude'); + } + /** * Returns whether the config file is set manually to read-only * @return bool |