diff options
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); |