iter_file_details_ext update impl
This commit is contained in:
parent
abce0c6629
commit
98f011673e
3 changed files with 26 additions and 9 deletions
|
|
@ -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>>>()?;
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ impl TorrentStorage for FilesystemStorage {
|
|||
for file_details in meta.info.iter_file_details_ext(&meta.lengths)? {
|
||||
let mut full_path = self.output_folder.clone();
|
||||
let relative_path = file_details
|
||||
.details
|
||||
.filename
|
||||
.to_pathbuf()
|
||||
.context("error converting file to path")?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue