# HG changeset patch # User souliane # Date 1398935665 -7200 # Node ID 191f440d11b47a64b2f40c008d38e5c68b2eff06 # Parent 52ec79aa5bbe96b45b4a22ae2174ea5345cbffd8 core (constants): use realpath instead of abspath + do not import it when building libervia diff -r 52ec79aa5bbe -r 191f440d11b4 src/core/constants.py --- a/src/core/constants.py Wed Apr 30 19:54:21 2014 +0200 +++ b/src/core/constants.py Thu May 01 11:14:25 2014 +0200 @@ -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 @@ } # 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))] ]