aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-16 13:45:22 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-16 13:45:22 -0500
commit824521b7bc67f85a060d45550f7e6db9d3ea703a (patch)
treedad3d637c9fbf747b7870ed502e61d43d9a8a6b4 /src
parentMerge pull request #5956 (diff)
parentwallet2: don't delete file that may not exist (diff)
downloadmonero-824521b7bc67f85a060d45550f7e6db9d3ea703a.tar.xz
Merge pull request #5959
4d22317 wallet2: don't delete file that may not exist (selsta)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index e495fa452..c7374b896 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -5589,6 +5589,11 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
const std::string address_file = m_wallet_file + ".address.txt";
r = save_to_file(address_file, m_account.get_public_address_str(m_nettype), true);
THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, m_wallet_file);
+ // remove old address file
+ r = boost::filesystem::remove(old_address_file);
+ if (!r) {
+ LOG_ERROR("error removing file: " << old_address_file);
+ }
}
// remove old wallet file
r = boost::filesystem::remove(old_file);
@@ -5600,11 +5605,6 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
if (!r) {
LOG_ERROR("error removing file: " << old_keys_file);
}
- // remove old address file
- r = boost::filesystem::remove(old_address_file);
- if (!r) {
- LOG_ERROR("error removing file: " << old_address_file);
- }
// remove old message store file
if (boost::filesystem::exists(old_mms_file))
{