.cache files moved from system tmp dir next to it's source
Peter Molnar hello@petermolnar.eu
Sun, 14 Jul 2019 20:47:41 +0100
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
meta.py
→
meta.py
@@ -9,7 +9,6 @@ import subprocess
import json import os import logging -import requests import keys import settings@@ -22,6 +21,7 @@
class CachedMeta(dict): def __init__(self, fpath): self.fpath = fpath + self.suffix = "cache" @property def cfile(self):@@ -30,7 +30,8 @@ if fname == "index.md":
fname = os.path.basename(os.path.dirname(self.fpath)) return os.path.join( - settings.tmpdir, "%s.%s.json" % (fname, self.__class__.__name__) + os.path.dirname(self.fpath), + "%s.%s.%s" % (fname, self.__class__.__name__, self.suffix), ) @property@@ -66,6 +67,7 @@
class Exif(CachedMeta): def __init__(self, fpath): self.fpath = fpath + self.suffix = "json.cache" self._read() def _call_tool(self):