From ffb051fca2f90b6a0ad83f5d9345b5596e4c37de Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 30 Jun 2019 15:39:58 +0200 Subject: [PATCH] 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. --- sat/core/constants.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sat/core/constants.py b/sat/core/constants.py index e998b4d4..379a45a2 100644 --- a/sat/core/constants.py +++ b/sat/core/constants.py @@ -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/')