X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/de68382af99d04266b2ca33967ff6ca4a3c87947..a2290fb189bee1da5e985d785e044d1681401ff7:/pinch.py diff --git a/pinch.py b/pinch.py index a7d5b65..1827281 100644 --- a/pinch.py +++ b/pinch.py @@ -25,6 +25,9 @@ from typing import ( Tuple, ) +import xdg + + Digest16 = NewType('Digest16', str) Digest32 = NewType('Digest32', str) @@ -216,9 +219,9 @@ def fetch_resources(v: Verification, channel: Channel) -> None: def git_cachedir(git_repo: str) -> str: - # TODO: Consider using pyxdg to find this path. - return os.path.expanduser( - '~/.cache/pinch/git/%s' % + return os.path.join( + xdg.XDG_CACHE_HOME, + 'pinch/git', digest_string( git_repo.encode()))