From 2e28fa39e8be927de51035c0d5df7acdb88d22a9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 26 Oct 2021 00:01:32 +0100 Subject: [PATCH] run: Mention why we're using .local/state Signed-off-by: Simon McVittie --- common/flatpak-run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 41a91ade..44470773 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -1847,6 +1847,9 @@ flatpak_run_apply_env_appid (FlatpakBwrap *bwrap, app_dir_data = g_file_get_child (app_dir, "data"); app_dir_config = g_file_get_child (app_dir, "config"); app_dir_cache = g_file_get_child (app_dir, "cache"); + /* Yes, this is inconsistent with data, config and cache. However, using + * this path lets apps provide backwards-compatibility with older Flatpak + * versions by using `--persist=.local/state --unset-env=XDG_STATE_DIR`. */ app_dir_state = g_file_get_child (app_dir, ".local/state"); flatpak_bwrap_set_env (bwrap, "XDG_DATA_HOME", flatpak_file_get_path_cached (app_dir_data), TRUE); flatpak_bwrap_set_env (bwrap, "XDG_CONFIG_HOME", flatpak_file_get_path_cached (app_dir_config), TRUE);