diff options
Diffstat (limited to 'poezio/config.py')
-rw-r--r-- | poezio/config.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/poezio/config.py b/poezio/config.py index 8549df71..5b99b293 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -507,6 +507,15 @@ def file_ok(filepath): return bool(val) +def get_image_cache(): + if not config.get('extract_inline_images'): + return None + tmp_dir = config.get('tmp_image_dir') + if tmp_dir: + return Path(tmp_dir) + return xdg.CACHE_HOME / 'images' + + def check_create_cache_dir(): """ create the cache directory if it doesn't exist |