Skip to content
Snippets Groups Projects
Commit 6b50d7a8 authored by Simon McVittie's avatar Simon McVittie
Browse files

wrap: Syntactically canonicalize environment variable values


If we're given a relative path, make it absolute before transforming
it for the host.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 5b6ddff4
No related branches found
No related tags found
No related merge requests found
......@@ -236,6 +236,7 @@ bind_and_propagate_from_environ (const char *variable,
FlatpakBwrap *bwrap)
{
g_autofree gchar *value_host = NULL;
g_autofree gchar *canon = NULL;
const char *value = g_getenv (variable);
if (value == NULL)
......@@ -248,7 +249,8 @@ bind_and_propagate_from_environ (const char *variable,
return;
}
value_host = pv_current_namespace_path_to_host_path (value);
canon = g_canonicalize_filename (value, NULL);
value_host = pv_current_namespace_path_to_host_path (canon);
g_debug ("Bind-mounting %s=\"%s\" from the current env as %s=\"%s\" in the host",
variable, value, variable, value_host);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment