aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs
index 474847be..a98b4584 100644
--- a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs
@@ -36,6 +36,12 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
36 { 36 {
37 using (var database = new Database(this.Context.DecompilePath, OpenDatabase.ReadOnly)) 37 using (var database = new Database(this.Context.DecompilePath, OpenDatabase.ReadOnly))
38 { 38 {
39 // Delete the directory and its files to prevent cab extraction failure due to an existing file.
40 if (Directory.Exists(this.Context.ExtractFolder))
41 {
42 Directory.Delete(this.Context.ExtractFolder, true);
43 }
44
39 var unbindCommand = new UnbindDatabaseCommand(this.Messaging, database, this.Context.DecompilePath, this.Context.DecompileType, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.IsAdminImage, false, skipSummaryInfo: false); 45 var unbindCommand = new UnbindDatabaseCommand(this.Messaging, database, this.Context.DecompilePath, this.Context.DecompileType, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.IsAdminImage, false, skipSummaryInfo: false);
40 var output = unbindCommand.Execute(); 46 var output = unbindCommand.Execute();
41 var extractedFilePaths = new List<string>(unbindCommand.ExportedFiles); 47 var extractedFilePaths = new List<string>(unbindCommand.ExportedFiles);