From 86d90d66aa8d1949cd7c630ba05878c7f273e709 Mon Sep 17 00:00:00 2001 From: souliane Date: Thu, 1 May 2014 11:14:25 +0200 Subject: [PATCH] core (constants): use realpath instead of abspath + do not import it when building libervia --- src/core/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/constants.py b/src/core/constants.py index 2e8bce24..d1ffc8d4 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -17,11 +17,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from os.path import expanduser, abspath try: import __pyjamas__ # do not import xdg when building Libervia BaseDirectory = None except ImportError: + from os.path import expanduser, realpath from xdg import BaseDirectory @@ -62,7 +62,7 @@ class Const(object): } # List of the configuration filenames sorted by ascending priority - CONFIG_FILES = [abspath(expanduser(path) + APP_NAME_FILE + '.conf') for path in + CONFIG_FILES = [realpath(expanduser(path) + APP_NAME_FILE + '.conf') for path in ['/etc/', '~/', '~/.', '', '.'] + ['%s/' % path for path in list(BaseDirectory.load_config_paths(APP_NAME_FILE))] ]