iter_file_details_ext update impl

This commit is contained in:
Igor Katson 2024-10-14 15:06:47 +01:00
parent abce0c6629
commit 98f011673e
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 26 additions and 9 deletions

View file

@ -1144,10 +1144,10 @@ impl Session {
.iter_file_details_ext(&lengths)?
.map(|fd| {
Ok::<_, anyhow::Error>(FileInfo {
relative_filename: fd.filename.to_pathbuf()?,
offset_in_torrent: fd.offset,
relative_filename: fd.details.filename.to_pathbuf()?,
offset_in_torrent: fd.details.offset,
piece_range: fd.pieces,
len: fd.len,
len: fd.details.len,
})
})
.collect::<anyhow::Result<Vec<FileInfo>>>()?;