fixed some awkward path joining stuff

This commit is contained in:
Daniel Pavel 2013-07-11 22:46:29 +02:00
parent d4d1a4f8e2
commit 0e6d088372
2 changed files with 3 additions and 3 deletions

View File

@ -10,8 +10,8 @@ from logging import getLogger, DEBUG as _DEBUG, INFO as _INFO
_log = getLogger(__name__)
del getLogger
_XDG_CONFIG_HOME = _os.environ.get('XDG_CONFIG_HOME') or _path.join(_path.expanduser('~'), '.config')
_file_path = _path.join(_path.join(_XDG_CONFIG_HOME, 'solaar'), 'config.json')
_XDG_CONFIG_HOME = _os.environ.get('XDG_CONFIG_HOME') or _path.expanduser(_path.join('~', '.config'))
_file_path = _path.join(_XDG_CONFIG_HOME, 'solaar', 'config.json')
from solaar import __version__

View File

@ -38,7 +38,7 @@ def _look_for_application_icons():
_log.debug("sys.path[0] = %s", _sys.path[0])
prefix_share = _path.normpath(_path.join(_path.realpath(_sys.path[0]), '..'))
src_share = _path.normpath(_path.join(_path.realpath(_sys.path[0]), '..', 'share'))
local_share = _environ.get('XDG_DATA_HOME', _path.expanduser('~/.local/share'))
local_share = _environ.get('XDG_DATA_HOME', _path.expanduser(_path.join('~', '.local', 'share')))
data_dirs = _environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share')
del _sys