From 4f65af97b408663c39ee83c5015956dbfc642dfe Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 29 Apr 2019 20:48:17 +0300 Subject: [PATCH] Remove dead code for walletFile check SplitWalletPath() garanties the walletFile is a plain filename without a directory. --- src/wallet/db.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 6a326bfd97c..fb3bb12a7a9 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;