rename to .backup at sdl end

This commit is contained in:
DenioD
2020-05-24 13:25:12 +02:00
parent d5138b8fa2
commit 79aecae12e

View File

@@ -266,7 +266,8 @@ void MainWindow::closeEvent(QCloseEvent* event) {
s.sync(); s.sync();
// Let the RPC know to shut down any running service.
rpc->shutdownhushd();
// Check is encryption is ON for SDl // Check is encryption is ON for SDl
if(fileExists(QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".silentdragonlite/silentdragonlite-wallet-enc.dat"))) if(fileExists(QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".silentdragonlite/silentdragonlite-wallet-enc.dat")))
@@ -325,9 +326,9 @@ void MainWindow::closeEvent(QCloseEvent* event) {
QFile file(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.dat")); QFile file(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.dat"));
file.rename(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP")); file.rename(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP"));
} }
// Let the RPC know to shut down any running service.
rpc->shutdownhushd();
// Bubble up // Bubble up
if (event) if (event)
@@ -593,6 +594,7 @@ void MainWindow::removeWalletEncryptionStartUp() {
QFile backup(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP")); QFile backup(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet.datBACKUP"));
if (filencrypted.size() > 0) if (filencrypted.size() > 0)
{ {