utils: Remap Flatpak /var/config, /var/data
In a Flatpak app, /var/config and /var/data are parallel mount points for
the same directories as $XDG_CONFIG_HOME and $XDG_DATA_HOME, which are
canonically under ~/.var/app/$FLATPAK_ID. /var/config and /var/data
don't exist as conventional FHS paths, so it seems safe to assume that
if they appear inside a Flatpak app, it's these aliases that are meant.
/var/cache and /var/tmp are not handled here, because those are
ambiguous and will need a different code structure to handle: they're
usually aliases for $XDG_CACHE_HOME and $XDG_CACHE_HOME/tmp respectively,
but it would be reasonable for a Flatpak app to have
--filesystem=/var/tmp, and not impossible for it to have
--filesystem=/var/cache/something.
Resolves: #592
Signed-off-by: Simon McVittie <smcv@collabora.com>
Loading
Please register or sign in to comment