diff options
author | John Stumpo <stump@jstump.com> | 2012-08-21 05:49:07 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-08-21 05:49:07 -0700 |
commit | f57fafe1d14010961048da5cbf86fe8bda2cd9d0 (patch) | |
tree | d1a4cf94a22b3fe720f92fee5f0a3ff6d33369c7 | |
parent | 78b419a3dfc0d9d60bdeb9db77505d86dfe2f268 (diff) |
Escape spaces in autodetected ${prefix} values on Windows
Without this, if the new ${prefix} path contains spaces, they are not
properly quoted in pkg-config's output. Besides the problems this causes
with things using the output, this also causes nonsensical results when
pkg-config splits such options to combine equal options.
-rw-r--r-- | parse.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1051,6 +1051,14 @@ parse_line (Package *pkg, const char *untrimmed, const char *path, *q = '/'; q++; } + + /* Now escape the special characters so that there's no danger + * of arguments that include the prefix getting split. + */ + q = prefix; + prefix = strdup_escape_shell (prefix); + g_free (q); + varname = g_strdup (tag); debug_spew (" Variable declaration, '%s' overridden with '%s'\n", tag, prefix); |