wallet: Replace %w by wallet name in -walletnotify script

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
This commit is contained in:
João Barbosa
2018-05-29 14:37:53 +01:00
parent 6196e93001
commit 9a5b5ee81f
4 changed files with 22 additions and 1 deletions

View File

@@ -63,6 +63,7 @@
#include <malloc.h>
#endif
#include <boost/algorithm/string/replace.hpp>
#include <thread>
#include <typeinfo>
#include <univalue.h>
@@ -1022,6 +1023,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)
{