aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs6
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs6
2 files changed, 6 insertions, 6 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);
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs
index fab780f8..21ea1541 100644
--- a/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs
@@ -121,12 +121,6 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
121 // extract the cabinet files 121 // extract the cabinet files
122 if (0 < cabinetFiles.Count) 122 if (0 < cabinetFiles.Count)
123 { 123 {
124 // delete the directory and its files to prevent cab extraction due to an existing file
125 if (Directory.Exists(this.ExportBasePath))
126 {
127 Directory.Delete(this.ExportBasePath, true);
128 }
129
130 // ensure the directory exists or extraction will fail 124 // ensure the directory exists or extraction will fail
131 Directory.CreateDirectory(this.ExportBasePath); 125 Directory.CreateDirectory(this.ExportBasePath);
132 126