A torrent of several files can be neither played nor reaped #158

Closed
opened 2026-10-08 18:36:24 -07:00 by rays · 1 comment
Owner

Found in a code audit on 2026-10-09.

Torrents::fetch (src/torrent.rs:117-118) records the torrent's output folder joined with its name. For a torrent of several files that is a directory. /media/{id} cannot serve one, and the reaper's remove_file (src/retention.rs:101-105) fails on it, warns "could not delete" on every pass and frees nothing, so those bytes count against the quota for good. Torrents are on in production.

Found in a code audit on 2026-10-09. `Torrents::fetch` (`src/torrent.rs:117-118`) records the torrent's output folder joined with its name. For a torrent of several files that is a directory. `/media/{id}` cannot serve one, and the reaper's `remove_file` (`src/retention.rs:101-105`) fails on it, warns "could not delete" on every pass and frees nothing, so those bytes count against the quota for good. Torrents are on in production.
rays added the bug label 2026-10-08 18:36:24 -07:00
Author
Owner

Fixed in ebecc12: download::remove deletes a file or a torrent's folder (reaper and Delete), counting a folder by its recorded size; download::playable serves the largest file in a folder, the episode. Test: a_torrent_folder_plays_its_largest_file_and_deletes_whole. Deployed as 0.10.3-dev on 2026-10-09.

Fixed in ebecc12: download::remove deletes a file or a torrent's folder (reaper and Delete), counting a folder by its recorded size; download::playable serves the largest file in a folder, the episode. Test: a_torrent_folder_plays_its_largest_file_and_deletes_whole. Deployed as 0.10.3-dev on 2026-10-09.
rays closed this issue 2026-10-08 18:58:45 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#158