Repeat prompt for wallet path if invalid

simplewallet run without a wallet path argument should prompt again if
an invalid path was entered.

Validity here currently means the string isn't empty.
This commit is contained in:
warptangent 2014-12-11 02:47:24 -08:00
parent efad735145
commit 95eb944ead
No known key found for this signature in database
GPG key ID: 0E490BEBFBE4E92D
3 changed files with 35 additions and 4 deletions

View file

@ -633,6 +633,11 @@ void wallet2::wallet_exists(const std::string& file_path, bool& keys_file_exists
wallet_file_exists = boost::filesystem::exists(wallet_file, ignore);
}
//----------------------------------------------------------------------------------------------------
bool wallet2::wallet_valid_path_format(const std::string& file_path)
{
return !file_path.empty();
}
//----------------------------------------------------------------------------------------------------
bool wallet2::parse_payment_id(const std::string& payment_id_str, crypto::hash& payment_id)
{
cryptonote::blobdata payment_id_data;