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

Only delete old file when new file very large.

parent af8ae2c3
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ namespace Aiursoft.Parser.FFmpeg
File.Delete(newFileName);
await _commandService.RunCommand("ffmpeg", $@"-i ""{filePath}"" -codec:a copy -codec:v {coder} -crf {_options.Crf} ""{newFileName}""", folder, getOutput: false);
if (File.Exists(newFileName))
if (File.Exists(newFileName) && new FileInfo(newFileName).Length > 8 * 1024 * 1024) // Larger than 8MB.
{
// Delete old file.
File.Delete(filePath);
......
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