run: Use a constant path for the reference to per-app directories

It's a bit simpler to get a per-app XDG_RUNTIME_DIR safely if we avoid
putting this in there. Nothing relies on it being in the
XDG_RUNTIME_DIR.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-04-15 18:14:20 +01:00
committed by Alexander Larsson
parent a89aa1442a
commit 3ec0e7b483

View File

@@ -4270,11 +4270,11 @@ flatpak_run_app (FlatpakDecomposed *app_ref,
if (per_app_dir_lock_path != NULL)
{
g_autofree char *dest = g_strdup_printf ("/run/user/%d/.app-ref", getuid ());
static const char lock[] = "/run/flatpak/per-app-dirs-ref";
flatpak_bwrap_add_args (bwrap,
"--ro-bind", per_app_dir_lock_path, dest,
"--lock-file", dest,
"--ro-bind", per_app_dir_lock_path, lock,
"--lock-file", lock,
NULL);
}