diff options
author | Rob Mensching <rob@firegiant.com> | 2017-12-06 11:39:26 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-12-06 11:40:03 -0800 |
commit | 5ba862bfa618c89a563d555e8ce7b44a904df406 (patch) | |
tree | cc2655422be3eec1f200efcbc0e562349c229274 /src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs | |
parent | e53afb01c6e01bb9e6521fa77d31e575abc73f9c (diff) | |
download | wix-5ba862bfa618c89a563d555e8ce7b44a904df406.tar.gz wix-5ba862bfa618c89a563d555e8ce7b44a904df406.tar.bz2 wix-5ba862bfa618c89a563d555e8ce7b44a904df406.zip |
Add support for loading Intermediates from extensions
Diffstat (limited to 'src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs')
-rw-r--r-- | src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs b/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs index 28fc4817..c6e21973 100644 --- a/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs +++ b/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs | |||
@@ -28,19 +28,16 @@ namespace WixToolset.Core.Bind | |||
28 | /// <returns>The extract path for the embedded file.</returns> | 28 | /// <returns>The extract path for the embedded file.</returns> |
29 | public string AddEmbeddedFileIndex(Uri uri, int embeddedFileIndex, string tempPath) | 29 | public string AddEmbeddedFileIndex(Uri uri, int embeddedFileIndex, string tempPath) |
30 | { | 30 | { |
31 | string extractPath; | ||
32 | SortedList<int, string> extracts; | ||
33 | |||
34 | // If the uri to the file that contains the embedded file does not already have embedded files | 31 | // If the uri to the file that contains the embedded file does not already have embedded files |
35 | // being extracted, create the dictionary to track that. | 32 | // being extracted, create the dictionary to track that. |
36 | if (!filesWithEmbeddedFiles.TryGetValue(uri, out extracts)) | 33 | if (!filesWithEmbeddedFiles.TryGetValue(uri, out var extracts)) |
37 | { | 34 | { |
38 | extracts = new SortedList<int, string>(); | 35 | extracts = new SortedList<int, string>(); |
39 | filesWithEmbeddedFiles.Add(uri, extracts); | 36 | filesWithEmbeddedFiles.Add(uri, extracts); |
40 | } | 37 | } |
41 | 38 | ||
42 | // If the embedded file is not already tracked in the dictionary of extracts, add it. | 39 | // If the embedded file is not already tracked in the dictionary of extracts, add it. |
43 | if (!extracts.TryGetValue(embeddedFileIndex, out extractPath)) | 40 | if (!extracts.TryGetValue(embeddedFileIndex, out var extractPath)) |
44 | { | 41 | { |
45 | string localFileNameWithoutExtension = Path.GetFileNameWithoutExtension(uri.LocalPath); | 42 | string localFileNameWithoutExtension = Path.GetFileNameWithoutExtension(uri.LocalPath); |
46 | string unique = this.HashUri(uri.AbsoluteUri); | 43 | string unique = this.HashUri(uri.AbsoluteUri); |