aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorcryptochangements34 <bevanoffr@gmail.com>2018-03-24 11:13:21 -0400
committercryptochangements34 <bevanoffr@gmail.com>2018-03-24 11:13:21 -0400
commitc8cb5fca5e90aea6300aaf4b1b9725a83fd181ad (patch)
tree9250556e5eab572efe117925ca1cc127d3dcda2c /src/simplewallet
parentMerge pull request #3434 (diff)
downloadmonero-c8cb5fca5e90aea6300aaf4b1b9725a83fd181ad.tar.xz
exit if specified wallet file doesn't exist
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 97dadb126..6476e0428 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3456,6 +3456,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
{