diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-06-23 14:47:22 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-06-23 16:01:41 +0300 |
commit | d60864785f94fc0fa842aa56c66b2ef2fea5b86b (patch) | |
tree | 287846bce14aaa1eefe70916a3e0688c8acc2aa9 /src/wallet | |
parent | Wallet: payment id and integrated address (diff) | |
download | monero-d60864785f94fc0fa842aa56c66b2ef2fea5b86b.tar.xz |
WalletManager::findWallets: searching by "keys" files instead of
"address.txt" files
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/wallet_manager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index 3a97538b4..4ed6e09fb 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -85,7 +85,7 @@ bool WalletManagerImpl::walletExists(const std::string &path) std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path) { std::vector<std::string> result; - const boost::regex wallet_rx("(.*)\\.(address\\.txt)$"); // searching for <wallet_name>.address.txt files + const boost::regex wallet_rx("(.*)\\.(keys)$"); // searching for <wallet_name>.keys files boost::filesystem::recursive_directory_iterator end_itr; // Default ctor yields past-the-end boost::filesystem::path work_dir(path); @@ -100,11 +100,9 @@ std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path) bool matched = boost::regex_match(filename, what, wallet_rx); if (matched) { - // if address file found, checking if there's corresponding .keys file and wallet file itself + // if keys file found, checking if there's wallet file itself std::string wallet_file = (itr->path().parent_path() /= what[1]).string(); - std::string wallet_key_file = wallet_file + std::string(".keys"); - if (boost::filesystem::exists(wallet_file) - && boost::filesystem::exists(wallet_key_file)) { + if (boost::filesystem::exists(wallet_file)) { LOG_PRINT_L3("Found wallet: " << wallet_file); result.push_back(wallet_file); } |