@@ -260,17 +260,15 @@ impl App {
261 let mut file_input = Vec::new();
261 let mut file_input = Vec::new();
262 for (input, name) in files_or_none.zip(filenames_or_none) {
262 for (input, name) in files_or_none.zip(filenames_or_none) {
264− Some(input) => {
263+ if let Some(input) = input {
265− if input.to_str().unwrap() == "-" {
264+ if input.to_str().unwrap() == "-" {
266− file_input.push(InputFile::StdIn(name));
265+ file_input.push(InputFile::StdIn(name));
267− } else {
266+ } else {
267+ let ofile = name.map_or(OrdinaryFile::from_path(input), |n| {
268+ OrdinaryFile::from_path_with_name(input, n)
268− file_input.push(InputFile::Ordinary(OrdinaryFile::from_path_with_name(
270+ file_input.push(InputFile::Ordinary(ofile))
276 return Ok(file_input);
274 return Ok(file_input);