summaryrefslogtreecommitdiff
path: root/poezio/config.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-07-04 12:44:55 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-07-04 12:47:02 +0200
commitd41bfa1c5761e7d23351b8892d448c0e242bbeb2 (patch)
treef8b9c4278a6e5c14373df75551d2c2756b4ca244 /poezio/config.py
parent35495fba60be1f1684c7b055e350eeaef092c2cb (diff)
downloadpoezio-d41bfa1c5761e7d23351b8892d448c0e242bbeb2.tar.gz
poezio-d41bfa1c5761e7d23351b8892d448c0e242bbeb2.tar.bz2
poezio-d41bfa1c5761e7d23351b8892d448c0e242bbeb2.tar.xz
poezio-d41bfa1c5761e7d23351b8892d448c0e242bbeb2.zip
Replace config.CACHE_DIR with xdg.CACHE_HOME.
Diffstat (limited to 'poezio/config.py')
-rw-r--r--poezio/config.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 5b99b293..127f37c2 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -516,26 +516,6 @@ def get_image_cache():
return xdg.CACHE_HOME / 'images'
-def check_create_cache_dir():
- """
- create the cache directory if it doesn't exist
- also create the subdirectories
- """
- global CACHE_DIR
- cache_home = environ.get("XDG_CACHE_HOME")
- if cache_home is None or not Path(cache_home).is_absolute():
- cache_home = path.join(environ.get('HOME'), '.cache')
- CACHE_DIR = path.join(cache_home, 'poezio')
-
- try:
- makedirs(CACHE_DIR)
- makedirs(path.join(CACHE_DIR, 'avatars'))
- makedirs(path.join(CACHE_DIR, 'images'))
- makedirs(path.join(CACHE_DIR, 'caps'))
- except OSError:
- pass
-
-
def check_config():
"""
Check the config file and print results
@@ -725,6 +705,3 @@ DATA_DIR = ''
# the global log dir
LOG_DIR = ''
-
-# the global cache dir
-CACHE_DIR = ''