diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-04-29 20:48:17 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-04-30 00:43:50 +0300 |
commit | 4f65af97b408663c39ee83c5015956dbfc642dfe (patch) | |
tree | e6262068cd8953cd8b1b733ebe0df01cc6b35880 | |
parent | 56376f336548b53cf31e98a58dfb4db22cede6e5 (diff) |
Remove dead code for walletFile check
SplitWalletPath() garanties the walletFile is a plain filename without a
directory.
-rw-r--r-- | src/wallet/db.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 6a326bfd97..fb3bb12a7a 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -407,13 +407,6 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr)); LogPrintf("Using wallet %s\n", file_path.string()); - // Wallet file must be a plain filename without a directory - if (walletFile != fs::basename(walletFile) + fs::extension(walletFile)) - { - errorStr = strprintf(_("Wallet %s resides outside wallet directory %s"), walletFile, walletDir.string()); - return false; - } - if (!env->Open(true /* retry */)) { errorStr = strprintf(_("Error initializing wallet database environment %s!"), walletDir); return false; |