From e9d15eed88e73bc481f58d41f25f40b8df5f26b8 Mon Sep 17 00:00:00 2001 From: Anton Malashin Date: Thu, 2 Jul 2020 19:35:41 +0300 Subject: [PATCH] Check if EBU STL import file is an STL file --- src/Logic/CommandLineConvert/CommandLineConverter.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Logic/CommandLineConvert/CommandLineConverter.cs b/src/Logic/CommandLineConvert/CommandLineConverter.cs index c4dc1c524..63c2c1682 100644 --- a/src/Logic/CommandLineConvert/CommandLineConverter.cs +++ b/src/Logic/CommandLineConvert/CommandLineConverter.cs @@ -432,7 +432,15 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert { if (File.Exists(ebuImportFileTemp)) { - ebuImportFile = ebuImportFileTemp; + var ebu = new Ebu(); + if (ebu.IsMine(null, ebuImportFileTemp)) + { + ebuImportFile = ebuImportFileTemp; + } + else + { + throw new Exception($"The /ebuimportfile '{ebuImportFileTemp}' is not a EBU STL file."); + } } else {