We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d678771 commit a4186ddCopy full SHA for a4186dd
src/wallet/wallet.cpp
@@ -3765,7 +3765,7 @@ bool CWallet::InitLoadWallet()
3765
3766
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
3767
3768
- if (walletFile.find_first_of("/\\") != std::string::npos) {
+ if (boost::filesystem::path(walletFile).filename() != walletFile) {
3769
return InitError(_("-wallet parameter must only specify a filename (not a path)"));
3770
} else if (SanitizeString(walletFile, SAFE_CHARS_FILENAME) != walletFile) {
3771
return InitError(_("Invalid characters in -wallet filename"));
0 commit comments