mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix: verify that parent exists in cache when inserting
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
e0fb25f846
commit
75cf17e4c4
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Reference in a new issue