mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
Merge pull request #967
e596e25
simplewallet: do not suggest removing cache if the password was wrong (moneromooo-monero)
This commit is contained in:
commit
1843d189c3
1 changed files with 3 additions and 1 deletions
|
@ -1701,6 +1701,8 @@ bool simple_wallet::open_wallet(const string &wallet_file, const std::string& pa
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
fail_msg_writer() << tr("failed to load wallet: ") << e.what();
|
fail_msg_writer() << tr("failed to load wallet: ") << e.what();
|
||||||
|
// 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;
|
fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue