mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
Merge #13339: wallet: Replace %w by wallet name in -walletnotify script
4e9efac678test: Check wallet name in -walletnotify script (João Barbosa)9a5b5ee81fwallet: Replace %w by wallet name in -walletnotify script (João Barbosa) Pull request description: Fixes #13237. ACKs for top commit: laanwj: ACK4e9efac678Tree-SHA512: 189dd1c785485f2e974d7c12531851b2a977778b3b954aa95efd527322ba3345924cfd587fb9c90b0fa979202af0ab2d90e53d125fe266a36c94f757e4176203
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <thread>
|
||||
#include <typeinfo>
|
||||
#include <univalue.h>
|
||||
@@ -1047,6 +1048,15 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
std::string ShellEscape(const std::string& arg)
|
||||
{
|
||||
std::string escaped = arg;
|
||||
boost::replace_all(escaped, "'", "'\"'\"'");
|
||||
return "'" + escaped + "'";
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_SYSTEM
|
||||
void runCommand(const std::string& strCommand)
|
||||
{
|
||||
|
||||
@@ -81,6 +81,9 @@ fs::path GetConfigFile(const std::string& confPath);
|
||||
#ifdef WIN32
|
||||
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
std::string ShellEscape(const std::string& arg);
|
||||
#endif
|
||||
#if HAVE_SYSTEM
|
||||
void runCommand(const std::string& strCommand);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user