diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-02-17 11:22:21 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-02-17 11:59:23 +0100 |
commit | 051439813e2cfcbba69c9b0c0eb00b43f9dde825 (patch) | |
tree | c1f91eb9eceed87fc5033471a4c36fa23cc45ddb /src/wallet/wallet.cpp | |
parent | 263f53e2d07acfbb5c301b654cab7ba63fd96784 (diff) | |
parent | 4e9efac678a9c0ea4e4c7dd956ea036ae6cf17ec (diff) | |
download | bitcoin-051439813e2cfcbba69c9b0c0eb00b43f9dde825.tar.xz |
Merge #13339: wallet: Replace %w by wallet name in -walletnotify script
4e9efac678a9c0ea4e4c7dd956ea036ae6cf17ec test: Check wallet name in -walletnotify script (João Barbosa)
9a5b5ee81f15b1d89cb25ff3e137a672536cdc46 wallet: Replace %w by wallet name in -walletnotify script (João Barbosa)
Pull request description:
Fixes #13237.
ACKs for top commit:
laanwj:
ACK 4e9efac678a9c0ea4e4c7dd956ea036ae6cf17ec
Tree-SHA512: 189dd1c785485f2e974d7c12531851b2a977778b3b954aa95efd527322ba3345924cfd587fb9c90b0fa979202af0ab2d90e53d125fe266a36c94f757e4176203
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 405afb6d8d..6b9f53f7c5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -847,6 +847,14 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose) if (!strCmd.empty()) { boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex()); +#ifndef WIN32 + // Substituting the wallet name isn't currently supported on windows + // because windows shell escaping has not been implemented yet: + // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-537384875 + // A few ways it could be implemented in the future are described in: + // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-461288094 + boost::replace_all(strCmd, "%w", ShellEscape(GetName())); +#endif std::thread t(runCommand, strCmd); t.detach(); // thread runs free } |