[Compare] - Return if directory is dropped.

This commit is contained in:
Ivandro Ismael 2016-09-04 22:09:48 +01:00
parent 5ff5a3c11a
commit a4c2da46e5
No known key found for this signature in database
GPG Key ID: A8832757DEFB7EDC

View File

@ -855,8 +855,14 @@ namespace Nikse.SubtitleEdit.Forms
string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error); string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
string filePath = files[0]; string filePath = files[0];
if (FileUtil.IsDirectory(filePath))
{
MessageBox.Show(Configuration.Settings.Language.Main.ErrorDirectoryDropNotAllowed,
string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
var listExt = new List<string>(); var listExt = new List<string>();
foreach (var s in Utilities.GetOpenDialogFilter().Split(new[] { '*' }, StringSplitOptions.RemoveEmptyEntries)) foreach (var s in Utilities.GetOpenDialogFilter().Split(new[] { '*' }, StringSplitOptions.RemoveEmptyEntries))
{ {