From 273522f28a466ce570dc013a2f2d0ea776702d48 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 27 Feb 2020 17:19:07 +1100 Subject: [PATCH] diskmanager: don't fail disk cache clear if the files simply don't exist QFile::remove() will return false if the file doesn't exist, but for our purposes that's as good as the file having been deleted. --- app/render/diskmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/render/diskmanager.cpp b/app/render/diskmanager.cpp index 10bf36817..053f7935a 100644 --- a/app/render/diskmanager.cpp +++ b/app/render/diskmanager.cpp @@ -159,7 +159,7 @@ bool DiskManager::ClearDiskCache(bool quick_delete) const HashTime& ht = disk_data_.at(i); // We return a false result if any of the files fail to delete, but still try to delete as many as we can - if (QFile::remove(ht.file_name)) { + if (QFile::remove(ht.file_name) || !QFileInfo::exists(ht.file_name)) { emit DeletedFrame(ht.hash); disk_data_.removeAt(i); i--;