mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Remove dead code for walletFile check
SplitWalletPath() garanties the walletFile is a plain filename without a directory.
This commit is contained in:
parent
56376f3365
commit
4f65af97b4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user