aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
index 32d1cfda..a31c8079 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
@@ -14,7 +14,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
14 using WixToolset.Msi; 14 using WixToolset.Msi;
15 using WixToolset.Core.Native; 15 using WixToolset.Core.Native;
16 using WixToolset.Core.Bind; 16 using WixToolset.Core.Bind;
17 using WixToolset.Core.Cab;
18 using WixToolset.Data.Tuples; 17 using WixToolset.Data.Tuples;
19 18
20 /// <summary> 19 /// <summary>
@@ -110,7 +109,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
110 wixFileRow.Directory_ = record[2]; 109 wixFileRow.Directory_ = record[2];
111 wixFileRow.DiskId = wixMergeRow.DiskId; 110 wixFileRow.DiskId = wixMergeRow.DiskId;
112 wixFileRow.PatchGroup = -1; 111 wixFileRow.PatchGroup = -1;
113 wixFileRow.Source = Path.Combine(this.IntermediateFolder, wixMergeRow.Id.Id, record[1]); 112 wixFileRow.Source = new IntermediateFieldPathValue { Path = Path.Combine(this.IntermediateFolder, wixMergeRow.Id.Id, record[1]) };
114 //WixFileRow wixFileRow = (WixFileRow)this.WixFileTable.CreateRow(wixMergeRow.SourceLineNumbers, false); 113 //WixFileRow wixFileRow = (WixFileRow)this.WixFileTable.CreateRow(wixMergeRow.SourceLineNumbers, false);
115 //wixFileRow.Directory = record[2]; 114 //wixFileRow.Directory = record[2];
116 //wixFileRow.DiskId = wixMergeRow.DiskId; 115 //wixFileRow.DiskId = wixMergeRow.DiskId;
@@ -204,20 +203,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind
204 string mergeIdPath = Path.Combine(this.IntermediateFolder, mergeId); 203 string mergeIdPath = Path.Combine(this.IntermediateFolder, mergeId);
205 Directory.CreateDirectory(mergeIdPath); 204 Directory.CreateDirectory(mergeIdPath);
206 205
207 using (var extractCab = new WixExtractCab()) 206 try
208 { 207 {
209 try 208 var cabinet = new Cabinet(moduleCabPath);
210 { 209 cabinet.Extract(mergeIdPath);
211 extractCab.Extract(moduleCabPath, mergeIdPath); 210 }
212 } 211 catch (FileNotFoundException)
213 catch (FileNotFoundException) 212 {
214 { 213 throw new WixException(WixErrors.CabFileDoesNotExist(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath));
215 throw new WixException(WixErrors.CabFileDoesNotExist(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath)); 214 }
216 } 215 catch
217 catch 216 {
218 { 217 throw new WixException(WixErrors.CabExtractionFailed(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath));
219 throw new WixException(WixErrors.CabExtractionFailed(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath));
220 }
221 } 218 }
222 } 219 }
223 catch (COMException ce) 220 catch (COMException ce)