diff options
-rw-r--r-- | pym/cache/flat_hash.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py index 722e9f184..d4c5930c7 100644 --- a/pym/cache/flat_hash.py +++ b/pym/cache/flat_hash.py @@ -26,7 +26,10 @@ class database(fs_template.FsBased): myf = open(fp, "r") try: d = self._parse_data(myf, cpv) - d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) + if "_mtime_" not in d: + """Backward compatibility with old cache that uses mtime + mangling.""" + d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) return d finally: myf.close() |