diff --git a/src/core/constants.py b/src/core/constants.py index 99a61903..ce9a8df2 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -19,10 +19,10 @@ import os.path try: - from xdg import BaseDirectory -except ImportError: - # Catch JS runtime error while using Libervia + import __pyjamas__ # do not import xdg when building Libervia BaseDirectory = None +except ImportError: + from xdg import BaseDirectory class Const(object): @@ -66,8 +66,8 @@ class Const(object): DEFAULT_LOCAL_DIR = BaseDirectory.save_data_path('sat') # List of the configuration filenames sorted by ascending priority - CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in \ - ['/etc/', '~/', '~/.', '', '.'] + \ + CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in + ['/etc/', '~/', '~/.', '', '.'] + ['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))] ]