summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/requirements.pip1
-rw-r--r--src/leap/base/config.py12
2 files changed, 4 insertions, 9 deletions
diff --git a/pkg/requirements.pip b/pkg/requirements.pip
index 9b521a95..19bd8514 100644
--- a/pkg/requirements.pip
+++ b/pkg/requirements.pip
@@ -14,6 +14,7 @@ python-dateutil
sh
pygeoip # optional
ping # to be deprecated
+dirspec
# soledad deps -- will move to its own repo soon
python-gnupg
diff --git a/src/leap/base/config.py b/src/leap/base/config.py
index 9583a46a..6d43a895 100644
--- a/src/leap/base/config.py
+++ b/src/leap/base/config.py
@@ -11,6 +11,7 @@ import os
logger = logging.getLogger(name=__name__)
from dateutil import parser as dateparser
+import dirspec
import requests
from leap.base import exceptions
@@ -279,15 +280,8 @@ def get_config_dir():
@rparam: config path
@rtype: string
"""
- # TODO
- # check for $XDG_CONFIG_HOME var?
- # get a more sensible path for win/mac
- # kclair: opinion? ^^
-
- return os.path.expanduser(
- os.path.join('~',
- '.config',
- 'leap'))
+ return os.path.join(dirspec.basedir.default_config_home,
+ 'leap')
def get_config_file(filename, folder=None):