Produce output file in current directory instead of source directory 📂
This commit is contained in:
parent
ee38c6aa9a
commit
e26b431bee
@ -22,7 +22,10 @@ fn main() {
|
||||
|
||||
let src_path = Path::new(&args[1]);
|
||||
let dest_path = if args.len() <= 2 {
|
||||
src_path.with_extension("pdf")
|
||||
let name = src_path
|
||||
.file_name()
|
||||
.expect("source path is not a file");
|
||||
Path::new(name).with_extension("pdf")
|
||||
} else {
|
||||
PathBuf::from(&args[2])
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user