diff sat/core/constants.py @ 2974:2464b3531f68

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.
author Goffi <goffi@goffi.org>
date Sun, 30 Jun 2019 15:39:58 +0200
parents 9a47a8caa280
children d86ecc34516e
line wrap: on
line diff
--- a/sat/core/constants.py	Thu Jun 27 20:32:18 2019 +0200
+++ b/sat/core/constants.py	Sun Jun 30 15:39:58 2019 +0200
@@ -218,7 +218,10 @@
                 ]
             )
 
-            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/')