diff --git a/ViewModel.cs b/ViewModel.cs index 0560ccc5..9aa17c6a 100644 --- a/ViewModel.cs +++ b/ViewModel.cs @@ -141,12 +141,14 @@ namespace GARbro.GUI { IEnumerable dir = Source; if (!string.IsNullOrEmpty (root_path)) + { dir = from entry in dir where entry.Name.StartsWith (root_path+m_delimiter) select entry; - if (!dir.Any()) - { - throw new DirectoryNotFoundException (string.Format ("{1}: {0}", guiStrings.MsgDirectoryNotFound, root_path)); + if (!dir.Any()) + { + throw new DirectoryNotFoundException (string.Format ("{1}: {0}", guiStrings.MsgDirectoryNotFound, root_path)); + } } m_suppress_notification = true; try