Skip to content
Snippets Groups Projects
Commit 912011d0 authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

wrap: parse env-if-host options as filenames instead of strings


If we parse the "env-if-host" options as "G_OPTION_ARG_STRING_ARRAY",
Glib assumes them to be encoded with the current locale. This can be an
issue when pressure-vessel needs to run the main game, because Steam
will set "LC_ALL=C", but the "env-if-host" might still contain
characters that are not ASCII.
To solve this we use "G_OPTION_ARG_FILENAME_ARRAY" that treats the
options as opaque byte-blobs.

Fixes: #52
Fixes: steam-runtime#349

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 9b29d5ae
No related branches found
No related tags found
1 merge request!221wrap: parse env-if-host options as filenames instead of strings
Pipeline #7684 passed
......@@ -972,7 +972,7 @@ static GOptionEntry options[] =
"[Default: $PRESSURE_VESSEL_COPY_RUNTIME_INTO or empty]",
"DIR" },
{ "env-if-host", '\0',
G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING_ARRAY, &opt_env_if_host,
G_OPTION_FLAG_NONE, G_OPTION_ARG_FILENAME_ARRAY, &opt_env_if_host,
"Set VAR=VAL if COMMAND is run with /usr from the host system, "
"but not if it is run with /usr from RUNTIME.", "VAR=VAL" },
{ "filesystem", '\0',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment