diff --git a/mopidy/__main__.py b/mopidy/__main__.py index 4e81856a..6a691cce 100644 --- a/mopidy/__main__.py +++ b/mopidy/__main__.py @@ -309,10 +309,9 @@ def validate_config(raw_config, schemas, extensions=None): def create_file_structures(): - path.get_or_create_dir(path.expand_path('$XDG_DATA_DIR/mopidy')) - path.get_or_create_dir(path.expand_path('$XDG_CONFIG_DIR/mopidy')) - path.get_or_create_file( - path.expand_path('$XDG_CONFIG_DIR/mopidy/mopidy.conf')) + path.get_or_create_dir('$XDG_DATA_DIR/mopidy') + path.get_or_create_dir('$XDG_CONFIG_DIR/mopidy') + path.get_or_create_file('$XDG_CONFIG_DIR/mopidy/mopidy.conf') def setup_audio(config): diff --git a/mopidy/utils/path.py b/mopidy/utils/path.py index eb0cbbb0..699b361f 100644 --- a/mopidy/utils/path.py +++ b/mopidy/utils/path.py @@ -28,7 +28,7 @@ XDG_DIRS = { def get_or_create_dir(dir_path): - dir_path = os.path.expanduser(dir_path) + dir_path = expand_path(dir_path) if os.path.isfile(dir_path): raise OSError( 'A file with the same name as the desired dir, ' @@ -40,7 +40,7 @@ def get_or_create_dir(dir_path): def get_or_create_file(filename): - filename = os.path.expanduser(filename) + filename = expand_path(filename) if not os.path.isfile(filename): logger.info('Creating file %s', filename) open(filename, 'w')