mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
disable watching after directory changes while archive is being created.
This commit is contained in:
parent
39d00a86b0
commit
6bc2627bf5
@ -39,6 +39,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
private void CreateArchiveExec (object sender, ExecutedRoutedEventArgs e)
|
private void CreateArchiveExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
StopWatchDirectoryChanges();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Directory.SetCurrentDirectory (CurrentPath);
|
Directory.SetCurrentDirectory (CurrentPath);
|
||||||
@ -80,10 +81,12 @@ namespace GARbro.GUI
|
|||||||
using (var file = File.Create (tmp_file.Name))
|
using (var file = File.Create (tmp_file.Name))
|
||||||
format.Create (file, file_list, dialog.ArchiveOptions);
|
format.Create (file, file_list, dialog.ArchiveOptions);
|
||||||
GARbro.Shell.File.Rename (tmp_file.Name, arc_name);
|
GARbro.Shell.File.Rename (tmp_file.Name, arc_name);
|
||||||
|
SetCurrentPosition (new DirectoryPosition (arc_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
{
|
{
|
||||||
|
m_watcher.EnableRaisingEvents = true;
|
||||||
PopupError (X.Message, guiStrings.TextCreateArchiveError);
|
PopupError (X.Message, guiStrings.TextCreateArchiveError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user