diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-22 00:58:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 16:02:37 -0700 |
| commit | d0462be8000f18aa7dc0791d02142f000bb19fbf (patch) | |
| tree | 072aabc2bd9b8f171e17654473f85c44a8a42a66 /src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | |
| parent | 1ed894bc0f39397ec7f7f6344370fc2123420c43 (diff) | |
| download | wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.gz wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.bz2 wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.zip | |
Integrate latest changes to tuple definitions
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs index f5561b42..369c241c 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | |||
| @@ -54,8 +54,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 54 | 54 | ||
| 55 | var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId); | 55 | var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId); |
| 56 | 56 | ||
| 57 | var wixMediaRows = this.Section.Tuples.OfType<WixMediaTuple>().ToDictionary(t => t.DiskId_); | ||
| 58 | |||
| 59 | using (Database db = new Database(this.DatabasePath, OpenDatabase.ReadOnly)) | 57 | using (Database db = new Database(this.DatabasePath, OpenDatabase.ReadOnly)) |
| 60 | { | 58 | { |
| 61 | using (View directoryView = db.OpenExecuteView("SELECT `Directory`, `Directory_Parent`, `DefaultDir` FROM `Directory`")) | 59 | using (View directoryView = db.OpenExecuteView("SELECT `Directory`, `Directory_Parent`, `DefaultDir` FROM `Directory`")) |
| @@ -85,25 +83,20 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 85 | { | 83 | { |
| 86 | var mediaTuple = mediaRows[facade.WixFile.DiskId]; | 84 | var mediaTuple = mediaRows[facade.WixFile.DiskId]; |
| 87 | string relativeFileLayoutPath = null; | 85 | string relativeFileLayoutPath = null; |
| 88 | string mediaLayoutFolder = null; | 86 | string mediaLayoutFolder = mediaTuple.Layout; |
| 89 | |||
| 90 | if (wixMediaRows.TryGetValue(facade.WixFile.DiskId, out var wixMediaRow)) | ||
| 91 | { | ||
| 92 | mediaLayoutFolder = wixMediaRow.Layout; | ||
| 93 | } | ||
| 94 | 87 | ||
| 95 | var mediaLayoutDirectory = this.ResolveMedia(mediaTuple, mediaLayoutFolder, this.LayoutDirectory); | 88 | var mediaLayoutDirectory = this.ResolveMedia(mediaTuple, mediaLayoutFolder, this.LayoutDirectory); |
| 96 | 89 | ||
| 97 | // setup up the query record and find the appropriate file in the | 90 | // setup up the query record and find the appropriate file in the |
| 98 | // previously executed file view | 91 | // previously executed file view |
| 99 | fileQueryRecord[1] = facade.File.File; | 92 | fileQueryRecord[1] = facade.File.Id.Id; |
| 100 | fileView.Execute(fileQueryRecord); | 93 | fileView.Execute(fileQueryRecord); |
| 101 | 94 | ||
| 102 | using (Record fileRecord = fileView.Fetch()) | 95 | using (Record fileRecord = fileView.Fetch()) |
| 103 | { | 96 | { |
| 104 | if (null == fileRecord) | 97 | if (null == fileRecord) |
| 105 | { | 98 | { |
| 106 | throw new WixException(ErrorMessages.FileIdentifierNotFound(facade.File.SourceLineNumbers, facade.File.File)); | 99 | throw new WixException(ErrorMessages.FileIdentifierNotFound(facade.File.SourceLineNumbers, facade.File.Id.Id)); |
| 107 | } | 100 | } |
| 108 | 101 | ||
| 109 | relativeFileLayoutPath = PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage); | 102 | relativeFileLayoutPath = PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage); |
