aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-07 15:14:10 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-08 13:36:25 +0300
commitb3473af950434305614bdf031fb408eaef06c1d5 (patch)
tree91aaf12b528584389be071d9aaaacf71889d30fe
parent7ce74ce206065c3af0035583330b3c773086f21c (diff)
Fix process ctor that doesn't quote empty arguments on Windows
-rw-r--r--butl/process.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/butl/process.cxx b/butl/process.cxx
index d8b10be..6b515b7 100644
--- a/butl/process.cxx
+++ b/butl/process.cxx
@@ -717,7 +717,7 @@ namespace butl
// there could be actual quotes in the value, we need to escape them.
//
string a (*p);
- bool quote (a.find (' ') != string::npos);
+ bool quote (a.empty () || a.find (' ') != string::npos);
if (quote)
cmd_line += '"';