summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-09-02 15:12:07 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-09-02 15:12:07 +0100
commitf97359706a407a876643026cb608e4d5dd319d29 (patch)
treec79f32774d94563c5f7cb38dcc9767ba4fb23fac
parent772d39f006ddebc091d2be0af6153b66dd8d27a8 (diff)
parentc9c246a3f5cad7907e5659a8657842adc1d84c69 (diff)
downloadnextcloud-server-f97359706a407a876643026cb608e4d5dd319d29.tar.gz
nextcloud-server-f97359706a407a876643026cb608e4d5dd319d29.zip
Merge pull request #18773 from owncloud/fix-useless-deletes
Soft fail when deleting and no entry found
-rw-r--r--lib/private/files/cache/cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 8cf097421d4..274d97822f5 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -466,6 +466,10 @@ class Cache {
*/
public function remove($file) {
$entry = $this->get($file);
+ if (!isset($entry['fileid'])) {
+ // perhaps file was deleted in the mean time?
+ return;
+ }
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?';
\OC_DB::executeAudited($sql, array($entry['fileid']));
if ($entry['mimetype'] === 'httpd/unix-directory') {