From 79aecae12ea603fc29e02b7723e23d5978627392 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sun, 24 May 2020 13:25:12 +0200 Subject: [PATCH] rename to .backup at sdl end --- src/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 681391a..cd2bd34 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -266,7 +266,8 @@ void MainWindow::closeEvent(QCloseEvent* event) { s.sync(); - + // Let the RPC know to shut down any running service. + rpc->shutdownhushd(); // Check is encryption is ON for SDl if(fileExists(QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".silentdragonlite/silentdragonlite-wallet-enc.dat"))) @@ -324,10 +325,10 @@ void MainWindow::closeEvent(QCloseEvent* event) { QFile file(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.dat")); file.rename(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP")); + } - // Let the RPC know to shut down any running service. - rpc->shutdownhushd(); + // Bubble up if (event) @@ -591,6 +592,7 @@ void MainWindow::removeWalletEncryptionStartUp() { auto dirHome = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); QFile filencrypted(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.dat")); QFile backup(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP")); + if (filencrypted.size() > 0)