aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-06-06 16:31:04 -0400
committerThomas Winget <tewinget@gmail.com>2014-06-12 19:05:51 -0400
commit8bc032ed092e65e944e9032bc6042ae118346fa9 (patch)
tree0f7b23b07b8d87a806ebbcffb68f5c6ffb56db6f /src/simplewallet
parentfixed some pointer- and loop-based derps (diff)
downloadmonero-8bc032ed092e65e944e9032bc6042ae118346fa9.tar.xz
more pointer-based derp
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index ef96d7b96..55099199d 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -255,10 +255,15 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
return false;
}
- size_t c = 0;
- if(!m_generate_new.empty()) ++c;
- if(!m_wallet_file.empty()) ++c;
- if (1 != c)
+ if(m_recover)
+ {
+ if (m_generate_new.empty())
+ {
+ fail_msg_writer() << "You must specify a wallet file name to recover to using either --generate-new-wallet=\"name\"";
+ return false;
+ }
+ }
+ else if(!m_generate_new.empty() ^ !m_wallet_file.empty())
{
if(!ask_wallet_create_if_needed())
return false;
@@ -286,7 +291,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
}
}
- if (!m_generate_new.empty())
+ if (!m_generate_new.empty() || m_recover)
{
// check for recover flag. if present, require electrum word list (only recovery option for now).
if (m_recover)