diff options
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs | 6 | ||||
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs index e874eed6..d622dbb2 100644 --- a/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Decompile/DecompileMsiOrMsmCommand.cs | |||
@@ -5,7 +5,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.ComponentModel; | 7 | using System.ComponentModel; |
8 | using System.Linq; | 8 | using System.IO; |
9 | using WixToolset.Core.Native; | 9 | using WixToolset.Core.Native; |
10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
11 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
@@ -46,7 +46,9 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
46 | // extract the files from the cabinets | 46 | // extract the files from the cabinets |
47 | if (!String.IsNullOrEmpty(this.Context.ExtractFolder) && !this.Context.SuppressExtractCabinets) | 47 | if (!String.IsNullOrEmpty(this.Context.ExtractFolder) && !this.Context.SuppressExtractCabinets) |
48 | { | 48 | { |
49 | var extractCommand = new ExtractCabinetsCommand(output, database, this.Context.DecompilePath, this.Context.ExtractFolder, this.Context.IntermediateFolder, this.Context.TreatProductAsModule); | 49 | var fileDirectory = Path.Combine(this.Context.ExtractFolder, "File"); |
50 | |||
51 | var extractCommand = new ExtractCabinetsCommand(output, database, this.Context.DecompilePath, fileDirectory, this.Context.IntermediateFolder, this.Context.TreatProductAsModule); | ||
50 | extractCommand.Execute(); | 52 | extractCommand.Execute(); |
51 | 53 | ||
52 | extractedFilePaths.AddRange(extractCommand.ExtractedFiles); | 54 | extractedFilePaths.AddRange(extractCommand.ExtractedFiles); |
diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs index eaed16b8..fab780f8 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/ExtractCabinetsCommand.cs | |||
@@ -121,23 +121,21 @@ 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 | var fileDirectory = Path.Combine(this.ExportBasePath, "File"); | ||
125 | |||
126 | // delete the directory and its files to prevent cab extraction due to an existing file | 124 | // delete the directory and its files to prevent cab extraction due to an existing file |
127 | if (Directory.Exists(fileDirectory)) | 125 | if (Directory.Exists(this.ExportBasePath)) |
128 | { | 126 | { |
129 | Directory.Delete(fileDirectory, true); | 127 | Directory.Delete(this.ExportBasePath, true); |
130 | } | 128 | } |
131 | 129 | ||
132 | // ensure the directory exists or extraction will fail | 130 | // ensure the directory exists or extraction will fail |
133 | Directory.CreateDirectory(fileDirectory); | 131 | Directory.CreateDirectory(this.ExportBasePath); |
134 | 132 | ||
135 | foreach (var cabinetFile in cabinetFiles) | 133 | foreach (var cabinetFile in cabinetFiles) |
136 | { | 134 | { |
137 | try | 135 | try |
138 | { | 136 | { |
139 | var cabinet = new Cabinet(cabinetFile); | 137 | var cabinet = new Cabinet(cabinetFile); |
140 | cabinet.Extract(fileDirectory); | 138 | cabinet.Extract(this.ExportBasePath); |
141 | } | 139 | } |
142 | catch (FileNotFoundException) | 140 | catch (FileNotFoundException) |
143 | { | 141 | { |
@@ -145,7 +143,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
145 | } | 143 | } |
146 | } | 144 | } |
147 | 145 | ||
148 | this.ExtractedFiles = Directory.GetFiles(fileDirectory); | 146 | this.ExtractedFiles = Directory.GetFiles(this.ExportBasePath); |
149 | } | 147 | } |
150 | else | 148 | else |
151 | { | 149 | { |