Downloads folder missing for a moment makes ipx forget every downloaded file #293
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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.