From ff4dba2bd2d7922d7157df1a5e088bf48f11e6bc Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 1 Aug 2014 16:41:47 +0400 Subject: [PATCH] (ArchiveViewModel): allowed empty archives. --- ViewModel.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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