Skip to content

Commit 4f65af9

Browse files
committed
Remove dead code for walletFile check
SplitWalletPath() garanties the walletFile is a plain filename without a directory.
1 parent 56376f3 commit 4f65af9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/wallet/db.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,6 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er
407407
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
408408
LogPrintf("Using wallet %s\n", file_path.string());
409409

410-
// Wallet file must be a plain filename without a directory
411-
if (walletFile != fs::basename(walletFile) + fs::extension(walletFile))
412-
{
413-
errorStr = strprintf(_("Wallet %s resides outside wallet directory %s"), walletFile, walletDir.string());
414-
return false;
415-
}
416-
417410
if (!env->Open(true /* retry */)) {
418411
errorStr = strprintf(_("Error initializing wallet database environment %s!"), walletDir);
419412
return false;

0 commit comments

Comments
 (0)