aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-08-22 22:54:22 +0200
committerRiccardo Spagni <ric@spagni.net>2016-08-22 22:54:22 +0200
commit1843d189c31ff926b39eebe19bd72cdb6b6b67fc (patch)
tree36f0b460ba1bcff33afa736a2642285c8ad1b45f
parentMerge pull request #964 (diff)
parentsimplewallet: do not suggest removing cache if the password was wrong (diff)
downloadmonero-1843d189c31ff926b39eebe19bd72cdb6b6b67fc.tar.xz
Merge pull request #967
e596e25 simplewallet: do not suggest removing cache if the password was wrong (moneromooo-monero)
-rw-r--r--src/simplewallet/simplewallet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 3f5297dfe..36d1fa0a9 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -1701,7 +1701,9 @@ bool simple_wallet::open_wallet(const string &wallet_file, const std::string& pa
catch (const std::exception& e)
{
fail_msg_writer() << tr("failed to load wallet: ") << e.what();
- fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file;
+ // only suggest removing cache if the password was actually correct
+ if (m_wallet->verify_password(password))
+ fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file;
return false;
}