backup wallets on shut down, skip when open on windows

This commit is contained in:
woodser 2024-01-29 06:53:55 -05:00
parent 4da41c5f18
commit 481b6c871a
2 changed files with 22 additions and 3 deletions

View file

@ -220,7 +220,7 @@ public class XmrWalletService {
}
public void saveMainWallet() {
saveMainWallet(true);
saveMainWallet(!(Utilities.isWindows() && wallet != null));
}
public void saveMainWallet(boolean backup) {
@ -324,6 +324,10 @@ public class XmrWalletService {
return syncWallet(wallet);
}
public void saveWallet(MoneroWallet wallet) {
saveWallet(wallet, false);
}
public void saveWallet(MoneroWallet wallet, boolean backup) {
wallet.save();
if (backup) backupWallet(wallet.getPath());