Fix a bug
This commit is contained in:
parent
175d5c7a97
commit
b301b159da
4 changed files with 24 additions and 20 deletions
|
|
@ -321,6 +321,18 @@ async fn main_torrent_info(
|
|||
};
|
||||
|
||||
if opts.list {
|
||||
for (idx, (filename, len)) in info.iter_filenames_and_lengths()?.enumerate() {
|
||||
let included = match &only_files {
|
||||
Some(files) => files.contains(&idx),
|
||||
None => true,
|
||||
};
|
||||
info!(
|
||||
"File {}, size {}{}",
|
||||
filename.to_string()?,
|
||||
SF::new(len),
|
||||
if included { "" } else { "will skip" }
|
||||
)
|
||||
}
|
||||
info!("--list was passed, nothing to do, exiting.");
|
||||
return Ok(());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue