fix: use epsilon comparison for mtime to prevent unnecessary re-mining (#610)

This commit is contained in:
Arnold Wender
2026-04-12 01:16:52 +02:00
committed by GitHub
parent ae5196bc8d
commit bb7ed80578
+1 -1
View File
@@ -67,7 +67,7 @@ def file_already_mined(collection, source_file: str, check_mtime: bool = False)
if stored_mtime is None:
return False
current_mtime = os.path.getmtime(source_file)
return float(stored_mtime) == current_mtime
return abs(float(stored_mtime) - current_mtime) < 0.001
return True
except Exception:
return False