Ensure configmanager config dir path is unicode

This commit is contained in:
Calum Lind 2017-03-17 11:31:32 +00:00
parent 85a1e478fe
commit 8326206f87
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ def get_default_config_dir(filename=None):
if not filename:
filename = ''
try:
return os.path.join(save_config_path('deluge'), filename)
return decode_bytes(os.path.join(save_config_path('deluge'), filename))
except OSError as ex:
log.error('Unable to use default config directory, exiting... (%s)', ex)
sys.exit(1)

View File

@ -111,7 +111,7 @@ def ConfigManager(config, defaults=None, file_version=1): # NOQA: N802
def set_config_dir(directory):
"""Sets the config directory, else just uses default"""
return _configmanager.set_config_dir(directory)
return _configmanager.set_config_dir(deluge.common.decode_bytes(directory))
def get_config_dir(filename=None):