X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=youtube-dl;a=blobdiff_plain;f=youtube_dl%2Fcache.py;fp=youtube_dl%2Fcache.py;h=5fe839eb1269586db95b9e25b4c8dabcdcd965d9;hp=2d9b426cb5e1d33bd64015a0d47ba80a5074403c;hb=92120217eb27d820bfba0f6a50837f111cbf80ef;hpb=37eddd314319d42f509307698196e4e9a8e84c7e diff --git a/youtube_dl/cache.py b/youtube_dl/cache.py index 2d9b426cb..5fe839eb1 100644 --- a/youtube_dl/cache.py +++ b/youtube_dl/cache.py @@ -8,7 +8,7 @@ import re import shutil import traceback -from .compat import compat_expanduser +from .compat import compat_expanduser, compat_getenv from .utils import write_json_file @@ -19,7 +19,7 @@ class Cache(object): def _get_root_dir(self): res = self._ydl.params.get('cachedir') if res is None: - cache_root = os.environ.get('XDG_CACHE_HOME', '~/.cache') + cache_root = compat_getenv('XDG_CACHE_HOME', '~/.cache') res = os.path.join(cache_root, 'youtube-dl') return compat_expanduser(res)