Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2019-06-20 09:02:26 +01:00
7 changed files with 88 additions and 52 deletions

View File

@ -212,7 +212,9 @@ args_escape(const char *s)
if (*s == '\0')
return (xstrdup(s));
if ((strchr(quoted, s[0]) != NULL || s[0] == '~') && s[1] == '\0') {
if (s[0] != ' ' &&
(strchr(quoted, s[0]) != NULL || s[0] == '~') &&
s[1] == '\0') {
xasprintf(&escaped, "\\%c", s[0]);
return (escaped);
}