diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 44e97f4f3a..f1b4b48a1b 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -627,6 +627,10 @@ class Cache implements ICache { $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);