mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 02:29:40 +00:00
Prevent data loss if concatenation failed (#353)
In some cases concatenation silently fails. To prevent loss of the encoded data we now check if the output file exists. If it does not exist we do not delete the temp folder.
This commit is contained in:
parent
9a95a00557
commit
0316a4c0ce
1 changed files with 3 additions and 1 deletions
|
@ -1273,7 +1273,9 @@ impl Project {
|
|||
plot_vmaf(&input, &output_file, model).unwrap();
|
||||
}
|
||||
|
||||
if !keep {
|
||||
if !Path::new(&output_file).exists() {
|
||||
warn!("Concatenating failed for unknown reasons! Temp folder will not be deleted: {}", temp);
|
||||
} else if !keep {
|
||||
if let Err(e) = fs::remove_dir_all(temp) {
|
||||
warn!("Failed to delete temp directory: {}", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue