Merge pull request #18773 from owncloud/fix-useless-deletes

Soft fail when deleting and no entry found
This commit is contained in:
Robin McCorkell 2015-09-02 15:12:07 +01:00
commit f97359706a
1 changed files with 4 additions and 0 deletions

View File

@ -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') {