summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 59e50164ef6..b851076e2c1 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -642,6 +642,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);