Viewer: Fix failing to open books if path to cache contains symbolic links. Fixes #1846834 [symlinked .cache cause calibre 4 reader fail](https://bugs.launchpad.net/calibre/+bug/1846834)

This commit is contained in:
Kovid Goyal 2019-10-05 10:27:48 +05:30
parent e9250df828
commit e0630cadd3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -146,7 +146,7 @@ def _get_cache_dir():
def cache_dir(): def cache_dir():
ans = getattr(cache_dir, 'ans', None) ans = getattr(cache_dir, 'ans', None)
if ans is None: if ans is None:
ans = cache_dir.ans = _get_cache_dir() ans = cache_dir.ans = os.path.realpath(_get_cache_dir())
return ans return ans