cache: skip .part files in evict_oldest
Prevents cache eviction from deleting a .part temp file that mpv's stream-record is actively writing to. Prerequisite for the stream-record plumbing in video_player.py.
This commit is contained in:
parent
acfcb88aca
commit
264c421dff
@ -506,7 +506,7 @@ def evict_oldest(max_bytes: int, protected_paths: set[str] | None = None) -> int
|
||||
for f in files:
|
||||
if current <= max_bytes:
|
||||
break
|
||||
if not f.is_file() or str(f) in protected:
|
||||
if not f.is_file() or str(f) in protected or f.suffix == ".part":
|
||||
continue
|
||||
size = f.stat().st_size
|
||||
f.unlink()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user