aboutsummaryrefslogtreecommitdiff
path: root/libbutl/process.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-04-09 18:42:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-04-09 18:42:08 +0200
commitdf27d2ac52bba33c541119caa3a1dc9d83690079 (patch)
tree26425389126e2fd59f99a13e71d1913ada946aa4 /libbutl/process.mxx
parent7083a1dc7d395df78d8e208c26ad996c5a6394f5 (diff)
Escape additional characters (=,;) if running batch file
Diffstat (limited to 'libbutl/process.mxx')
-rw-r--r--libbutl/process.mxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbutl/process.mxx b/libbutl/process.mxx
index 9106549..ab5e84f 100644
--- a/libbutl/process.mxx
+++ b/libbutl/process.mxx
@@ -503,13 +503,15 @@ LIBBUTL_MODEXPORT namespace butl
static void
print (std::ostream&, const char* const args[], size_t n = 0);
- // Quote and escape the specified command line argument. Return the
- // original string if neither is necessary and a pointer to the provided
- // buffer string containing the escaped version otherwise.
+ // Quote and escape the specified command line argument. If batch is true
+ // then also quote the equal (`=`), comma (`,`) and semicolon (`;`)
+ // characters which are treated as argument separators in batch file.
+ // Return the original string if neither is necessary and a pointer to the
+ // provided buffer string containing the escaped version otherwise.
//
#ifdef _WIN32
static const char*
- quote_argument (const char*, std::string& buffer);
+ quote_argument (const char*, std::string& buffer, bool batch);
#endif
public: