From 8bc8bdb2f20197502df51251eae1af694b1758fb Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 12 May 2021 14:52:19 +0200 Subject: [PATCH] dont backup wallets outside of wallets folder --- src/main/java/com/sparrowwallet/sparrow/io/Storage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Storage.java b/src/main/java/com/sparrowwallet/sparrow/io/Storage.java index 26132dce..c2a966b9 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Storage.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Storage.java @@ -219,7 +219,9 @@ public class Storage { } public void backupWallet() throws IOException { - backupWallet(null); + if(walletFile.toPath().startsWith(getWalletsDir().toPath())) { + backupWallet(null); + } } public void backupTempWallet() {