Use FileUtil's helper method instead

This commit is contained in:
ivandrofly 2015-06-04 18:54:41 +01:00
parent ab6ed4aeac
commit d2f6d90e13

View File

@ -9614,8 +9614,7 @@ namespace Nikse.SubtitleEdit.Forms
var fi = new FileInfo(fileName);
// Do not allow directory drop
bool isDirectory = (File.GetAttributes(fi.FullName) & FileAttributes.Directory) == FileAttributes.Directory;
if (isDirectory)
if (FileUtil.IsDirectory(fileName))
{
MessageBox.Show(_language.ErrorDirectoryDropNotAllowed, fi.Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;