Do not try to delete padding files as they dont exist

This commit is contained in:
Igor Katson 2025-06-12 12:23:29 +01:00
parent 1409dffb8f
commit 99bf295028
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -1473,6 +1473,9 @@ pub(crate) struct ResolveMagnetResult {
fn remove_files_and_dirs(infos: &FileInfos, files: &dyn TorrentStorage) {
let mut all_dirs = HashSet::new();
for (id, fi) in infos.iter().enumerate() {
if fi.attrs.padding {
continue;
}
let mut fname = &*fi.relative_filename;
if let Err(e) = files.remove_file(id, fname) {
warn!(?fi.relative_filename, error=?e, "could not delete file");