summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2021-10-26 00:01:32 +0100
committerAlexander Larsson <alexander.larsson@gmail.com>2021-11-15 11:07:57 +0100
commit2e28fa39e8be927de51035c0d5df7acdb88d22a9 (patch)
treeed0016fadd2ad2df3b5143f8099eb911ee2d5d3b
parent0fda062c96a44a78ac0480da5e270ea60c837fe6 (diff)
downloadflatpak-2e28fa39e8be927de51035c0d5df7acdb88d22a9.tar.gz
run: Mention why we're using .local/state
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--common/flatpak-run.c3
1 files changed, 3 insertions, 0 deletions
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);