Round the timestamp value read from .vacuum file to prevent potential errors caused by float values (#6800)

This commit is contained in:
Sergey Krashevich
2023-06-15 01:19:26 +03:00
committed by GitHub
parent ff1b5c87aa
commit 3efa77f302

View File

@@ -196,7 +196,7 @@ class FrigateApp:
if os.path.exists(f"{CONFIG_DIR}/.vacuum"):
with open(f"{CONFIG_DIR}/.vacuum") as f:
try:
timestamp = int(f.readline())
timestamp = round(float(f.readline()))
except Exception:
timestamp = 0