From 32f8f1ff1ae4c96a3cea64f81e173e77c03ff11e Mon Sep 17 00:00:00 2001 From: niksedk Date: Sat, 15 Jul 2023 09:42:01 +0200 Subject: [PATCH] Delete temp file --- src/ui/Forms/GenerateVideoWithHardSubs.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui/Forms/GenerateVideoWithHardSubs.cs b/src/ui/Forms/GenerateVideoWithHardSubs.cs index 5b3ae7e29..690dd9a34 100644 --- a/src/ui/Forms/GenerateVideoWithHardSubs.cs +++ b/src/ui/Forms/GenerateVideoWithHardSubs.cs @@ -921,6 +921,18 @@ namespace Nikse.SubtitleEdit.Forms Configuration.Settings.Tools.GenVideoFontSizePercentOfHeight = (float)(currentHeight / _videoInfo.Height); } } + + try + { + if (!string.IsNullOrEmpty(_mpvSubtitleFileName)) + { + File.Delete(_mpvSubtitleFileName); + } + } + catch + { + // ignore + } } private void comboBoxVideoEncoding_SelectedIndexChanged(object sender, EventArgs e)