diff options
author | Jeremie Laval <jeremie.laval@gmail.com> | 2012-03-30 00:12:09 +0400 |
---|---|---|
committer | Jeremie Laval <jeremie.laval@gmail.com> | 2012-03-30 00:12:09 +0400 |
commit | 278ad061f15e8385102726280b9dcc1215fbdfe9 (patch) | |
tree | 26565703d6cbb87e570f815156088ea6106294ab /AppleDocWizard/AppleDocHandler.cs | |
parent | ec10550d9dfde5141a51b9ba1f6cb9bde2c3fc9e (diff) |
[appledocwizard] Only push back archive and write status file when the operation wasn't cancelled
Diffstat (limited to 'AppleDocWizard/AppleDocHandler.cs')
-rw-r--r-- | AppleDocWizard/AppleDocHandler.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/AppleDocWizard/AppleDocHandler.cs b/AppleDocWizard/AppleDocHandler.cs index 1f341cb..c8bc098 100644 --- a/AppleDocWizard/AppleDocHandler.cs +++ b/AppleDocWizard/AppleDocHandler.cs @@ -211,10 +211,12 @@ namespace macdoc CancellationToken = token }); merger.MergeDocumentation (); - mdocArchive.Dispose (); - var statusFile = Path.Combine (baseApplicationPath, "macdoc", "merge.status"); - File.WriteAllText (statusFile, infos.Version.ToString ()); + if (!token.IsCancellationRequested) { + mdocArchive.CommitChanges (); + var statusFile = Path.Combine (baseApplicationPath, "macdoc", "merge.status"); + File.WriteAllText (statusFile, infos.Version.ToString ()); + } FireAppleDocEvent (new AppleDocEventArgs () { Stage = ProcessStage.Finished }); } |