You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(core.utils): extract _iter_tmp_entries and _sum_tmp_sizes
The same scandir-then-stat-for-size loop appeared in three places
(`_compute_total_size`, `_sweep_stale_tmp_files`, `_enforce_size_cap`).
`_iter_tmp_entries` covers the scandir + is_file filter +
context-managed cleanup that all three need.
`_sum_tmp_sizes` covers the size accumulation that both
`_compute_total_size` and `_enforce_size_cap` need.
Net result: each callsite now reads as one obvious line instead of
seven, and a future change to the temp-walk discipline (e.g. switching
to a different scan strategy) lands in one place.
0 commit comments