diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-16 23:15:35 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-16 23:15:35 +0100 |
commit | e596e25367d490d5826ec58fdba81e4aaf06bccf (patch) | |
tree | be4bb8381a099950942179f92767a787453feabc /src/simplewallet/simplewallet.cpp | |
parent | Merge pull request #963 (diff) | |
download | monero-e596e25367d490d5826ec58fdba81e4aaf06bccf.tar.xz |
simplewallet: do not suggest removing cache if the password was wrong
Diffstat (limited to '')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 4 |
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; } |