~lioploum/offpunk

0a9fb62582f4a361c9ab8c24fe54ba001f55fd4a — Ploum 4 months ago 87837fd
check that the cache_path ends with /
2 files changed, 4 insertions(+), 0 deletions(-)

M CHANGELOG
M offutils.py
M CHANGELOG => CHANGELOG +1 -0
@@ 2,6 2,7 @@


## 2.2 - Unpublished
- cache folder is now configurable through $OFFPUNK_CACHE_PATH environment variable (by prx)
- offpunk: adding an URL to a list now update the view mode if url already present
- netcache: solve an infinite gemini loop with code 6X (see also bug #31)
- ansicat: added support for <video> HTML-element

M offutils.py => offutils.py +3 -0
@@ 68,6 68,9 @@ def xdg(folder="cache"):
                    os.path.join(_home,'.cache')
    _CACHE_PATH = os.environ.get('OFFPUNK_CACHE_PATH', \
        os.path.join(os.path.expanduser(cache_home),"offpunk/"))
    #Check that the cache path ends with "/"
    if not _CACHE_PATH.endswith("/"):
        _CACHE_PATH += "/"
    os.makedirs(_CACHE_PATH,exist_ok=True)
    if folder == "cache" and not UPGRADED:
        upgrade_cache(_CACHE_PATH)