From dc0938d49c84f04f40b873cbd6d66fafef44b5b5 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 13 Sep 2024 12:17:37 -0400 Subject: [PATCH] fix reference to backup cache file --- .../java/haveno/core/xmr/wallet/XmrWalletService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 325bdc1313..55b09682bd 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -1503,15 +1503,15 @@ public class XmrWalletService extends XmrWalletBase { } // handle success or failure + File originalCacheBackup = new File(cachePath + ".backup"); if (retrySuccessful) { - originalCacheFile.delete(); // delete original wallet cache backup + if (originalCacheBackup.exists()) originalCacheBackup.delete(); // delete original wallet cache backup } else { // restore original wallet cache log.warn("Failed to open full wallet using backup cache, restoring original cache"); File cacheFile = new File(cachePath); if (cacheFile.exists()) cacheFile.delete(); - File originalCacheBackup = new File(cachePath + ".backup"); if (originalCacheBackup.exists()) originalCacheBackup.renameTo(new File(cachePath)); // throw exception @@ -1607,15 +1607,15 @@ public class XmrWalletService extends XmrWalletBase { } // handle success or failure + File originalCacheBackup = new File(cachePath + ".backup"); if (retrySuccessful) { - originalCacheFile.delete(); // delete original wallet cache backup + if (originalCacheBackup.exists()) originalCacheBackup.delete(); // delete original wallet cache backup } else { // restore original wallet cache log.warn("Failed to open RPC wallet using backup cache, restoring original cache"); File cacheFile = new File(cachePath); if (cacheFile.exists()) cacheFile.delete(); - File originalCacheBackup = new File(cachePath + ".backup"); if (originalCacheBackup.exists()) originalCacheBackup.renameTo(new File(cachePath)); // throw exception