diff options
author | selsta <selsta@sent.at> | 2019-10-04 20:41:37 +0200 |
---|---|---|
committer | selsta <selsta@sent.at> | 2019-10-04 20:43:40 +0200 |
commit | 4d22317dee11701546320a6eea84c5f643465d4e (patch) | |
tree | 97eb6aadae751b498b42ad8b90d187d9649e6e60 /src/wallet/wallet2.cpp | |
parent | Merge pull request #5549 (diff) | |
download | monero-4d22317dee11701546320a6eea84c5f643465d4e.tar.xz |
wallet2: don't delete file that may not exist
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b85e805de..24fceabf6 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5570,6 +5570,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); @@ -5581,11 +5586,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)) { |