mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-23 19:11:14 +01:00
handle missing file edge case
This commit is contained in:
parent
039f1a522e
commit
07ad2d97b1
@ -405,8 +405,11 @@ class RecordingCleanup(threading.Thread):
|
||||
|
||||
for f in files_to_check:
|
||||
p = Path(f)
|
||||
try:
|
||||
if p.stat().st_mtime < delete_before.get(p.parent.name, default_expire):
|
||||
p.unlink(missing_ok=True)
|
||||
except FileNotFoundError:
|
||||
logger.warning(f"Attempted to expire missing file: {f}")
|
||||
|
||||
logger.debug("End expire files (legacy).")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user