mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-26 13:47:03 +02:00
handle missing file edge case
This commit is contained in:
parent
7a2a85d253
commit
ae3c01fe2d
@ -405,8 +405,11 @@ class RecordingCleanup(threading.Thread):
|
|||||||
|
|
||||||
for f in files_to_check:
|
for f in files_to_check:
|
||||||
p = Path(f)
|
p = Path(f)
|
||||||
if p.stat().st_mtime < delete_before.get(p.parent.name, default_expire):
|
try:
|
||||||
p.unlink(missing_ok=True)
|
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).")
|
logger.debug("End expire files (legacy).")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user