Skip to content
Snippets Groups Projects
Commit c917ea18 authored by Joas Schilling's avatar Joas Schilling Committed by Thomas Müller
Browse files

Only check unique keys for the comparison on filecache insert & update otherwise

parent 8fa69238
Branches
No related tags found
No related merge requests found
...@@ -251,10 +251,15 @@ class Cache { ...@@ -251,10 +251,15 @@ class Cache {
return trim($item, "`"); return trim($item, "`");
}, $queryParts); }, $queryParts);
$values = array_combine($queryParts, $params); $values = array_combine($queryParts, $params);
if (\OC::$server->getDatabaseConnection()->insertIfNotExist('*PREFIX*filecache', $values)) { if (\OC::$server->getDatabaseConnection()->insertIfNotExist('*PREFIX*filecache', $values, [
'storage',
'path_hash',
])) {
return (int)\OC_DB::insertid('*PREFIX*filecache'); return (int)\OC_DB::insertid('*PREFIX*filecache');
} }
// The file was created in the mean time
$this->update($id, $data);
return $this->getId($file); return $this->getId($file);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment