Downloads folder missing for a moment makes ipx forget every downloaded file #293

Closed
opened 2026-10-19 10:40:15 -07:00 by rays · 1 comment
Owner

retention::run calls db.missing_files() (crates/ipx/src/db.rs:976), which marks every enclosure whose path does not exist() as reaped and clears its path. If /downloads is unreachable when a reap runs (the array stopped, shfs dropping with 'Transport endpoint is not connected'), exists() is false for every file, so every downloaded episode is marked reaped at once. The files stay on disk but ipx no longer lists or plays them, does not download them again, and the quota sweep no longer counts them. Found in a repo audit. Fix: skip the reconcile when cfg.general.download_dir is not a directory, with a test.

retention::run calls db.missing_files() (crates/ipx/src/db.rs:976), which marks every enclosure whose path does not exist() as reaped and clears its path. If /downloads is unreachable when a reap runs (the array stopped, shfs dropping with 'Transport endpoint is not connected'), exists() is false for every file, so every downloaded episode is marked reaped at once. The files stay on disk but ipx no longer lists or plays them, does not download them again, and the quota sweep no longer counts them. Found in a repo audit. Fix: skip the reconcile when cfg.general.download_dir is not a directory, with a test.
rays added the bug label 2026-10-19 10:40:15 -07:00
Author
Owner

Fixed in 7af6153: retention::run reconciles missing files only while download_dir is a directory, and otherwise warns 'the downloads folder is not there; left every file as it was'. Tested by a_downloads_folder_that_is_gone_forgets_no_file. Deployed in ipx.

Fixed in 7af6153: retention::run reconciles missing files only while download_dir is a directory, and otherwise warns 'the downloads folder is not there; left every file as it was'. Tested by a_downloads_folder_that_is_gone_forgets_no_file. Deployed in ipx.
rays closed this issue 2026-10-19 11:17:38 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#293