core (constants): fixed flatpak config paths for older versions of flatpak:

Older versions of Flatpak don't seem to set FLATPAK_ID, but do set FLATPAK_SANDBOX_DIR, so
this is now checked too to detect flatpak.
This commit is contained in:
Goffi 2019-06-30 15:39:58 +02:00
commit ffb051fca2

View file

@ -218,7 +218,10 @@ class Const(object):
]
)
if os.getenv('FLATPAK_ID'):
# on recent versions of Flatpak, FLATPAK_ID is set at run time
# it seems that this is not the case on older versions,
# but FLATPAK_SANDBOX_DIR seems set then
if os.getenv('FLATPAK_ID') or os.getenv('FLATPAK_SANDBOX_DIR'):
# for Flatpak, the conf can't be set in /etc or $HOME, so we have
# to add /app
CONFIG_PATHS.append('/app/')