From c9c246a3f5cad7907e5659a8657842adc1d84c69 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Wed, 2 Sep 2015 14:50:07 +0100 Subject: Soft fail when deleting and no entry found --- lib/private/files/cache/cache.php | 4 ++++ 1 file changed, 4 insertions(+) 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') { -- cgit v1.2.3