From 6bc2627bf5e5ec4a7928ee58ff301a339dc3d7c9 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 26 Jul 2014 23:22:06 +0400 Subject: [PATCH] disable watching after directory changes while archive is being created. --- GarCreate.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GarCreate.cs b/GarCreate.cs index 791ec931..4d4b098b 100644 --- a/GarCreate.cs +++ b/GarCreate.cs @@ -39,6 +39,7 @@ namespace GARbro.GUI { private void CreateArchiveExec (object sender, ExecutedRoutedEventArgs e) { + StopWatchDirectoryChanges(); try { Directory.SetCurrentDirectory (CurrentPath); @@ -80,10 +81,12 @@ namespace GARbro.GUI using (var file = File.Create (tmp_file.Name)) format.Create (file, file_list, dialog.ArchiveOptions); GARbro.Shell.File.Rename (tmp_file.Name, arc_name); + SetCurrentPosition (new DirectoryPosition (arc_name)); } } catch (Exception X) { + m_watcher.EnableRaisingEvents = true; PopupError (X.Message, guiStrings.TextCreateArchiveError); } }