Check if EBU STL import file is an STL file

This commit is contained in:
Anton Malashin 2020-07-02 19:35:41 +03:00
parent d686c67ea6
commit e9d15eed88

View File

@ -431,10 +431,18 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
if (ebuImportFileTemp.Length > 0)
{
if (File.Exists(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
{
throw new Exception($"The /ebuimportfile '{ebuImportFileTemp}' does not exist.");
}