diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 2d2f14fc55423..cbf56fe8de1bf 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -371,10 +371,12 @@ public function getCache($path = '', $storage = null) { if (!$storage) { $storage = $this; } + $sourceRoot = $this->getSourceRootInfo(); if ($this->storage instanceof FailedStorage) { return new FailedCache(); } - $this->cache = new \OCA\Files_Sharing\Cache($storage, $this->getSourceRootInfo(), $this->superShare); + + $this->cache = new \OCA\Files_Sharing\Cache($storage, $sourceRoot, $this->superShare); return $this->cache; }