diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index a18fddcbdeb1d..01cf60325a3a0 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -642,6 +642,10 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) { $targetPath = $this->normalize($targetPath); $sourceData = $sourceCache->get($sourcePath); + if ($sourceData === false) { + throw new \Exception('Invalid source storage path: ' . $sourcePath); + } + $sourceId = $sourceData['fileid']; $newParentId = $this->getParentId($targetPath);