Skip to content
Snippets Groups Projects
Commit 8614b4ec authored by Anduin Xue's avatar Anduin Xue
Browse files

Throw if new file does not exist.

parent 2a8f5c5b
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,15 @@ namespace Parser
File.Delete(newFileName);
await _commandService.RunCommand("ffmpeg", $@"-i ""{filePath}"" -codec:a copy -codec:v {coder} -b:v 16M ""{newFileName}""", folder, getOutput: false);
// Delete old file.
File.Delete(filePath);
if (File.Exists(newFileName))
{
// Delete old file.
File.Delete(filePath);
}
else
{
throw new Exception("After parsing, still couldn't locate the converted file: " + newFileName);
}
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment