mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-04-19 09:00:43 +02:00
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.
This commit is contained in:
parent
78b419a3df
commit
f57fafe1d1
1 changed files with 8 additions and 0 deletions
8
parse.c
8
parse.c
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue