From 92aa3debabad54e32a4a3048b7ec656d9f44003e Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 29 Jul 2014 06:57:35 +0400 Subject: [PATCH] extract all files when no entries are selected. --- GarExtract.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GarExtract.cs b/GarExtract.cs index 7f4f7258..df860cad 100644 --- a/GarExtract.cs +++ b/GarExtract.cs @@ -44,7 +44,7 @@ namespace GARbro.GUI private void ExtractItemExec (object sender, ExecutedRoutedEventArgs e) { var entry = CurrentDirectory.SelectedItem as EntryViewModel; - if (null == entry) + if (null == entry && !ViewModel.IsArchive) return; try { @@ -66,7 +66,7 @@ namespace GARbro.GUI var vm = ViewModel as ArchiveViewModel; string destination = Path.GetDirectoryName (vm.Path); string arc_name = Path.GetFileName (vm.Path); - if (entry.Name == ".." && vm.SubDir == "") // root entry + if (null == entry || (entry.Name == ".." && vm.SubDir == "")) // root entry { ExtractArchive (m_app.CurrentArchive, arc_name, destination); } @@ -128,7 +128,7 @@ namespace GARbro.GUI } finally { - m_watcher.EnableRaisingEvents = true; + ResumeWatchDirectoryChanges(); } } IEnumerable file_list = arc.Dir;