diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2c0ce89929c..d7ab511e9a8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -472,8 +472,7 @@ std::shared_ptr RestoreWallet(WalletContext& context, const fs::path& b error += strprintf(Untranslated("Unexpected exception: %s"), e.what()); } if (!wallet) { - fs::remove(wallet_file); - fs::remove(wallet_path); + fs::remove_all(wallet_path); } return wallet;