mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:59:38 +00:00
UI: AutoUpdateManager: Delay an update dir clearing
Until Installer's exit.
This commit is contained in:
parent
2a262c8a76
commit
c0fc891c5b
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user