Remove dead code for walletFile check

SplitWalletPath() garanties the walletFile is a plain filename without a
directory.
This commit is contained in:
Hennadii Stepanov 2019-04-29 20:48:17 +03:00
parent 56376f3365
commit 4f65af97b4
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -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;