reuse known parentId when inserting cache entries in scanner
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
5439469b68
commit
3fb32f6f3d
|
@ -274,7 +274,9 @@ class Cache implements ICache {
|
|||
}
|
||||
|
||||
$data['path'] = $file;
|
||||
$data['parent'] = $this->getParentId($file);
|
||||
if (!isset($data['parent'])) {
|
||||
$data['parent'] = $this->getParentId($file);
|
||||
}
|
||||
$data['name'] = basename($file);
|
||||
|
||||
[$values, $extensionValues] = $this->normalizeData($data);
|
||||
|
|
|
@ -220,6 +220,7 @@ class Scanner extends BasicEmitter implements IScanner {
|
|||
if (!empty($newData)) {
|
||||
// Reset the checksum if the data has changed
|
||||
$newData['checksum'] = '';
|
||||
$newData['parent'] = $parentId;
|
||||
$data['fileid'] = $this->addToCache($file, $newData, $fileId);
|
||||
}
|
||||
if (isset($cacheData['size'])) {
|
||||
|
|
Loading…
Reference in New Issue