refactor: move "delete old update files" logic to Updates (#5535)

This commit is contained in:
pajlada
2024-08-08 20:28:08 +02:00
committed by GitHub
parent f0802af055
commit 89857e37de
4 changed files with 29 additions and 17 deletions
+1 -16
View File
@@ -241,22 +241,7 @@ void runGui(QApplication &a, const Paths &paths, Settings &settings,
}
#endif
auto thread = std::thread([dir = paths.miscDirectory] {
{
auto path = combinePath(dir, "Update.exe");
if (QFile::exists(path))
{
QFile::remove(path);
}
}
{
auto path = combinePath(dir, "update.zip");
if (QFile::exists(path))
{
QFile::remove(path);
}
}
});
updates.deleteOldFiles();
// Clear the cache 1 minute after start.
QTimer::singleShot(60 * 1000, [cachePath = paths.cacheDirectory(),