mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-24 18:29:12 +00:00
Ensure configmanager config dir path is unicode
This commit is contained in:
parent
85a1e478fe
commit
8326206f87
@ -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)
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user