Merge pull request #5959

4d22317 wallet2: don't delete file that may not exist (selsta)
release-v0.7.1.0
luigi1111 5 years ago
commit 824521b7bc
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -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))
{

Loading…
Cancel
Save