diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-05-30 15:55:37 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-05-30 15:55:37 -0500 |
commit | f03bf36c857855b0e6b0270b74c8bb1bc2d053ee (patch) | |
tree | 6740ad3ad069d2720ff91eb84a01c7548efac358 /src/simplewallet/simplewallet.cpp | |
parent | Merge pull request #3442 (diff) | |
parent | exit if specified wallet file doesn't exist (diff) | |
download | monero-f03bf36c857855b0e6b0270b74c8bb1bc2d053ee.tar.xz |
Merge pull request #3491
c8cb5fc exit if specified wallet file doesn't exist (cryptochangements34)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 81896ca55..a45d444f1 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3496,6 +3496,17 @@ bool simple_wallet::open_wallet(const boost::program_options::variables_map& vm) fail_msg_writer() << tr("wallet file path not valid: ") << m_wallet_file; return false; } + + bool keys_file_exists; + bool wallet_file_exists; + + tools::wallet2::wallet_exists(m_wallet_file, keys_file_exists, wallet_file_exists); + if(!keys_file_exists) + { + fail_msg_writer() << tr("Key file not found. Failed to open wallet"); + return false; + } + epee::wipeable_string password; try { |