File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use std:: error:: Error ;
22use std:: io:: { BufReader , Read , Write } ;
3+ use std:: path:: PathBuf ;
34use std:: process:: { ChildStdin , Command , Stdio } ;
45use std:: sync:: mpsc:: { Receiver , Sender } ;
56use std:: { mem, thread} ;
@@ -312,10 +313,11 @@ impl App<'_> {
312313 let mut command_builder = CommandBuilder :: default ( ) ;
313314 apply_visitor ( & mut command_builder, & mut self . params ) ;
314315 let input = self . source . input . clone ( ) ;
315- let output_file = format ! (
316- "{}/{}.{}" ,
317- self . output_folder, self . output_filename, command_builder. ext
318- ) ;
316+ let mut path = PathBuf :: new ( )
317+ . join ( & * self . output_folder )
318+ . join ( & * self . output_filename ) ;
319+ path. set_extension ( & * command_builder. ext ) ;
320+ let output_file = path. display ( ) . to_string ( ) ;
319321
320322 let mut args: Vec < String > = Vec :: new ( ) ;
321323 if overwrite {
You can’t perform that action at this time.
0 commit comments