diff --git a/SubFolderExtractor/Model/ExtractionModel.cs b/SubFolderExtractor/Model/ExtractionModel.cs index fc395a1..5fb3888 100644 --- a/SubFolderExtractor/Model/ExtractionModel.cs +++ b/SubFolderExtractor/Model/ExtractionModel.cs @@ -130,7 +130,7 @@ public void StartExtraction(string startDirectory) NotifyOfPropertyChange(() => Progress); } - IsExecuting = false; + if (totalDirectoriesCount == 0) IsExecuting = false; } public void Cancel() @@ -204,6 +204,8 @@ private void ExtractionFinished(object sender, EventArgs e) if (!complete) autoResetEvent.Set(); // allow the next extraction to start (if there is one) + else + IsExecuting = false; } private void ExtractionProgress(object sender, ProgressEventArgs e)