comparison 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
comparison
equal deleted inserted replaced
2973:a9e0bbedeac2 2974:2464b3531f68
216 "%s/" % path 216 "%s/" % path
217 for path in list(BaseDirectory.load_config_paths(APP_NAME_FILE)) 217 for path in list(BaseDirectory.load_config_paths(APP_NAME_FILE))
218 ] 218 ]
219 ) 219 )
220 220
221 if os.getenv('FLATPAK_ID'): 221 # on recent versions of Flatpak, FLATPAK_ID is set at run time
222 # it seems that this is not the case on older versions,
223 # but FLATPAK_SANDBOX_DIR seems set then
224 if os.getenv('FLATPAK_ID') or os.getenv('FLATPAK_SANDBOX_DIR'):
222 # for Flatpak, the conf can't be set in /etc or $HOME, so we have 225 # for Flatpak, the conf can't be set in /etc or $HOME, so we have
223 # to add /app 226 # to add /app
224 CONFIG_PATHS.append('/app/') 227 CONFIG_PATHS.append('/app/')
225 228
226 ## Configuration ## 229 ## Configuration ##