Catch invalid cache source storage path
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
eeea77112e
commit
c74a10ddb4
|
@ -612,6 +612,10 @@ class Cache implements ICache {
|
||||||
$targetPath = $this->normalize($targetPath);
|
$targetPath = $this->normalize($targetPath);
|
||||||
|
|
||||||
$sourceData = $sourceCache->get($sourcePath);
|
$sourceData = $sourceCache->get($sourcePath);
|
||||||
|
if ($sourceData === false) {
|
||||||
|
throw new \Exception('Invalid source storage path: ' . $sourcePath);
|
||||||
|
}
|
||||||
|
|
||||||
$sourceId = $sourceData['fileid'];
|
$sourceId = $sourceData['fileid'];
|
||||||
$newParentId = $this->getParentId($targetPath);
|
$newParentId = $this->getParentId($targetPath);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue