diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-09 18:20:51 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 22:37:49 +0100 |
commit | c917ea183ce0acf7c49f8c7104c9ffa54f2b804f (patch) | |
tree | 70c07766bf4d51ded2bcf695dc41ccb9e65bb126 /lib | |
parent | 8fa692388b29979c56ff6d0229d20e09e8ecba65 (diff) | |
download | nextcloud-server-c917ea183ce0acf7c49f8c7104c9ffa54f2b804f.tar.gz nextcloud-server-c917ea183ce0acf7c49f8c7104c9ffa54f2b804f.zip |
Only check unique keys for the comparison on filecache insert & update otherwise
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/cache.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 62c32ce6593..d39b59b23e4 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -251,10 +251,15 @@ class Cache { return trim($item, "`"); }, $queryParts); $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'); } + // The file was created in the mean time + $this->update($id, $data); return $this->getId($file); } } |