From 9a5b5ee81f15b1d89cb25ff3e137a672536cdc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Tue, 29 May 2018 14:37:53 +0100 Subject: wallet: Replace %w by wallet name in -walletnotify script Co-authored-by: Russell Yanofsky --- src/util/system.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/util/system.cpp') diff --git a/src/util/system.cpp b/src/util/system.cpp index 8d1efc170..2e58f3551 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -63,6 +63,7 @@ #include #endif +#include #include #include #include @@ -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) { -- cgit v1.2.3