aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Decompile
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2018-12-17 17:13:29 -0500
committerBob Arnson <bob@firegiant.com>2018-12-17 17:22:20 -0500
commit65a9e0b609f6b25e0e138eef9e8bb58cd98120d9 (patch)
tree1d1612f716a99370833c0819abcb36bb98f2c507 /src/WixToolset.Core.WindowsInstaller/Decompile
parentfefa4b5403b7cfe29649e71d8b5f1a18faa93568 (diff)
downloadwix-65a9e0b609f6b25e0e138eef9e8bb58cd98120d9.tar.gz
wix-65a9e0b609f6b25e0e138eef9e8bb58cd98120d9.tar.bz2
wix-65a9e0b609f6b25e0e138eef9e8bb58cd98120d9.zip
Clean and create export directory early.
...to support extracting cabinets to the root of the export directory rather than requiring files in cabinets to be extracted to their own directory.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Decompile')
-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);