aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-04-19 10:50:59 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-04-19 10:55:13 +0200
commit64c45aada7029121b7a590aa5f6d01d064ca9a9b (patch)
treeedd8fd20e3657a1c5986b548f1286edb68b686b1 /src/wallet/wallet.cpp
parent9111df9673beb6d6616d491a5478f09b5f14d040 (diff)
parenta4186dd23944b0b803523632e1578d5c4ebb9e57 (diff)
Merge #10226: wallet: Use boost to more portably ensure -wallet specifies only a filename
a4186dd wallet: Use boost to more portably ensure -wallet specifies only a filename (Luke Dashjr) Tree-SHA512: 6dfde31fa599638e5ec76489363e2fed97403be3e5762e4560dfc6ac261ce169a92b5a1b92bb34a893cc898e6073c81f74f49528e8df07e86273ddb37dd1ce80
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 057d18f27d..10073f7e6d 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3887,7 +3887,7 @@ bool CWallet::InitLoadWallet()
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
- if (walletFile.find_first_of("/\\") != std::string::npos) {
+ if (boost::filesystem::path(walletFile).filename() != walletFile) {
return InitError(_("-wallet parameter must only specify a filename (not a path)"));
} else if (SanitizeString(walletFile, SAFE_CHARS_FILENAME) != walletFile) {
return InitError(_("Invalid characters in -wallet filename"));