From 065bcb3da8c62b36e60cb8beadd5104040b3eed2 Mon Sep 17 00:00:00 2001 From: Kp Date: Tue, 17 Dec 2019 05:01:38 +0000 Subject: [PATCH] Escape more characters when quoting for the command line Inserting the compile command for vers_id.cpp into a compilation database does not quote a string with embedded whitespace, although this string is correctly quoted when used to invoke a shell. Remove whitespace from the character whitelist, so that it is always escaped. --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 68abb178c..3c02c2d00 100644 --- a/SConstruct +++ b/SConstruct @@ -4163,7 +4163,7 @@ class DXXCommon(LazyObjectConstructor): prior = False for c in f(s): # No xdigit support in str - if c in ' ()*+,-./:=[]_' or (c.isalnum() and not (prior and (c.isdigit() or c in 'abcdefABCDEF'))): + if c in '+,-./:=_' or (c.isalnum() and not (prior and (c.isdigit() or c in 'abcdefABCDEF'))): r += c elif c == '\n': r += r'\n'