diff options
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/main.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index b678cda9..5ae20f4a 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -29,7 +29,9 @@ fn run() -> Result<(), Box<dyn Error>> { // Compute the output filename from the input filename by replacing the extension. let dest_path = if args.len() <= 2 { let stem = source_path.file_stem().ok_or_else(|| "missing destation file name")?; + let base = source_path.parent().ok_or_else(|| "missing destation folder")?; + base.join(format!("{}.pdf", stem.to_string_lossy())) } else { PathBuf::from(&args[2]) |
