Moved xdg import so it is not called on Windows, where it is unused. fixes #1343
This commit is contained in:
parent
116ccc21fd
commit
15ce2b71f9
|
@ -63,7 +63,6 @@ if not hasattr(json, "dumps"):
|
||||||
json.load = load
|
json.load = load
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import xdg, xdg.BaseDirectory
|
|
||||||
import gettext
|
import gettext
|
||||||
import locale
|
import locale
|
||||||
|
|
||||||
|
@ -150,6 +149,7 @@ def get_default_config_dir(filename=None):
|
||||||
else:
|
else:
|
||||||
return os.path.join(os.environ.get("APPDATA"), "deluge")
|
return os.path.join(os.environ.get("APPDATA"), "deluge")
|
||||||
else:
|
else:
|
||||||
|
import xdg.BaseDirectory
|
||||||
if filename:
|
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:
|
||||||
|
|
Loading…
Reference in New Issue