Create output parent directory if it doesn't exists (#91)

This commit is contained in:
ByteDream 2022-12-27 20:49:53 +01:00
parent 2c3bd78fc1
commit c37e2495e1
2 changed files with 20 additions and 0 deletions

View file

@ -647,6 +647,13 @@ fn generate_mkv(
debug!("ffmpeg {}", command_args.join(" "));
// create parent directory if it does not exist
if let Some(parent) = target.parent() {
if !parent.exists() {
std::fs::create_dir_all(parent)?
}
}
let ffmpeg = Command::new("ffmpeg")
.stdout(Stdio::null())
.stderr(Stdio::piped())