comparison sat/core/constants.py @ 3145:3f414c897e70

core (constants): don't parse `sat.conf` from current dir anymore + parse root_dir last
author Goffi <goffi@goffi.org>
date Wed, 29 Jan 2020 19:12:46 +0100
parents 02325c3141dd
children 320b762cbdf0
comparison
equal deleted inserted replaced
3144:02325c3141dd 3145:3f414c897e70
453 ] 453 ]
454 else: 454 else:
455 import os 455 import os
456 root_dir = Path(sat.__file__).parent 456 root_dir = Path(sat.__file__).parent
457 Const.CONFIG_PATHS = ( 457 Const.CONFIG_PATHS = (
458 ["/etc/", "~/", "~/.", "", root_dir, "."] 458 ["/etc/", "~/", "~/."]
459 + [ 459 + [
460 "%s/" % path 460 "%s/" % path
461 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) 461 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))
462 ] 462 ]
463 + [root_dir]
463 ) 464 )
464 465
465 # on recent versions of Flatpak, FLATPAK_ID is set at run time 466 # on recent versions of Flatpak, FLATPAK_ID is set at run time
466 # it seems that this is not the case on older versions, 467 # it seems that this is not the case on older versions,
467 # but FLATPAK_SANDBOX_DIR seems set then 468 # but FLATPAK_SANDBOX_DIR seems set then