mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 23:48:40 +00:00
fix path of config in windows
This commit is contained in:
parent
1f3e930df3
commit
18d7026db7
1 changed files with 9 additions and 3 deletions
|
@ -99,7 +99,13 @@ def get_default_config_dir(filename=None):
|
||||||
""" Returns the config path if no filename is specified
|
""" Returns the config path if no filename is specified
|
||||||
Returns the config directory + filename as a path if filename is specified
|
Returns the config directory + filename as a path if filename is specified
|
||||||
"""
|
"""
|
||||||
if filename != None:
|
if windows_check():
|
||||||
|
if filename:
|
||||||
|
return os.path.join(os.environ.get("APPDATA"), "deluge"), filename)
|
||||||
|
else:
|
||||||
|
return os.path.join(os.environ.get("APPDATA"), "deluge")
|
||||||
|
else:
|
||||||
|
if filename:
|
||||||
return os.path.join(xdg.BaseDirectory.save_config_path("deluge"), filename)
|
return os.path.join(xdg.BaseDirectory.save_config_path("deluge"), filename)
|
||||||
else:
|
else:
|
||||||
return xdg.BaseDirectory.save_config_path("deluge")
|
return xdg.BaseDirectory.save_config_path("deluge")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue