#5 Bugfix: Replace pathlib.Path.home() with os.path.expanduser('~'), because pathlib.Path.home() need python3.5+. ~_~|||

This commit is contained in:
codezjx 2017-08-12 01:33:18 +08:00
parent a58b389e91
commit d175c368e3
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
import pathlib
from configparser import ConfigParser from configparser import ConfigParser
@ -11,7 +10,7 @@ _CONFIG_KEY_SONG_NAME_TYPE = 'song.name_type'
_CONFIG_KEY_SONG_FOLDER_TYPE = 'song.folder_type' _CONFIG_KEY_SONG_FOLDER_TYPE = 'song.folder_type'
# Base path # Base path
_CONFIG_MAIN_PATH = os.path.join(pathlib.Path.home(), '.ncm') _CONFIG_MAIN_PATH = os.path.join(os.path.expanduser('~'), '.ncm')
_CONFIG_FILE_PATH = os.path.join(_CONFIG_MAIN_PATH, 'ncm.ini') _CONFIG_FILE_PATH = os.path.join(_CONFIG_MAIN_PATH, 'ncm.ini')
_DEFAULT_DOWNLOAD_PATH = os.path.join(_CONFIG_MAIN_PATH, 'download') _DEFAULT_DOWNLOAD_PATH = os.path.join(_CONFIG_MAIN_PATH, 'download')