fix: verify that parent exists in cache when inserting

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/48160/head
Robin Appelman 2 years ago
parent e0fb25f846
commit 75cf17e4c4
  1. 3
      lib/private/Files/Cache/Cache.php

@ -265,6 +265,9 @@ class Cache implements ICache {
if (!isset($data['parent'])) {
$data['parent'] = $this->getParentId($file);
}
if ($data['parent'] === -1 && $file !== '') {
throw new \Exception('Parent folder not in filecache for ' . $file);
}
$data['name'] = basename($file);
[$values, $extensionValues] = $this->normalizeData($data);

Loading…
Cancel
Save