UI: AutoUpdateManager: Delay an update dir clearing

Until Installer's exit.
This commit is contained in:
Nodir Temirkhodjaev 2024-04-25 19:50:15 +03:00
parent 2a262c8a76
commit c0fc891c5b

View File

@ -2,6 +2,7 @@
#include <QFileInfo>
#include <QProcess>
#include <QTimer>
#include <fortsettings.h>
#include <rpc/rpcmanager.h>
@ -41,7 +42,7 @@ void AutoUpdateManager::setUp()
setupByTaskInfo(taskInfo);
if (!isDownloaded()) {
clearUpdateDir();
QTimer::singleShot(5, this, &AutoUpdateManager::clearUpdateDir);
}
}
@ -105,6 +106,9 @@ void AutoUpdateManager::setupByTaskInfo(TaskInfoUpdateChecker *taskInfo)
void AutoUpdateManager::clearUpdateDir()
{
if (isDownloaded() || isDownloading())
return;
auto settings = IoC<FortSettings>();
if (settings->isMaster()) {