diff options
Diffstat (limited to 'src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs')
-rw-r--r-- | src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs b/src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs index b30ac48a..ac6a2b8f 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/BurnReader.cs | |||
@@ -25,7 +25,6 @@ namespace WixToolset.Core.Burn.Bundles | |||
25 | { | 25 | { |
26 | private bool disposed; | 26 | private bool disposed; |
27 | 27 | ||
28 | private bool invalidBundle; | ||
29 | private BinaryReader binaryReader; | 28 | private BinaryReader binaryReader; |
30 | private readonly List<DictionaryEntry> attachedContainerPayloadNames; | 29 | private readonly List<DictionaryEntry> attachedContainerPayloadNames; |
31 | 30 | ||
@@ -53,13 +52,12 @@ namespace WixToolset.Core.Burn.Bundles | |||
53 | /// <returns>Burn reader.</returns> | 52 | /// <returns>Burn reader.</returns> |
54 | public static BurnReader Open(IMessaging messaging, string fileExe) | 53 | public static BurnReader Open(IMessaging messaging, string fileExe) |
55 | { | 54 | { |
56 | var reader = new BurnReader(messaging, fileExe); | 55 | var binaryReader = new BinaryReader(File.Open(fileExe, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)); |
57 | 56 | var reader = new BurnReader(messaging, fileExe) | |
58 | reader.binaryReader = new BinaryReader(File.Open(fileExe, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)); | ||
59 | if (!reader.Initialize(reader.binaryReader)) | ||
60 | { | 57 | { |
61 | reader.invalidBundle = true; | 58 | binaryReader = binaryReader, |
62 | } | 59 | }; |
60 | reader.Initialize(reader.binaryReader); | ||
63 | 61 | ||
64 | return reader; | 62 | return reader; |
65 | } | 63 | } |
@@ -78,7 +76,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
78 | return false; | 76 | return false; |
79 | } | 77 | } |
80 | 78 | ||
81 | if (this.invalidBundle) | 79 | if (this.Invalid) |
82 | { | 80 | { |
83 | return false; | 81 | return false; |
84 | } | 82 | } |
@@ -156,7 +154,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
156 | return false; | 154 | return false; |
157 | } | 155 | } |
158 | 156 | ||
159 | if (this.invalidBundle) | 157 | if (this.Invalid) |
160 | { | 158 | { |
161 | return false; | 159 | return false; |
162 | } | 160 | } |