Skip to content

Commit

Permalink
Fixes #49
Browse files Browse the repository at this point in the history
  • Loading branch information
activescott committed Mar 24, 2015
1 parent e9a1e38 commit 03ec95a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LessMsi.Core/Msi/Wixtracts.cs
Expand Up @@ -458,8 +458,11 @@ private static List<CabInfo> CabsFromMsiToDisk(FileInfo msi, Database msidb, Dir
{
const int MsiInterop_Media_Cabinet = 4;
string cabSourceName = record[MsiInterop_Media_Cabinet];
if (string.IsNullOrEmpty(cabSourceName))
throw new IOException("Couldn't find media CAB file inside the MSI (bad media table?).");
if (string.IsNullOrEmpty(cabSourceName))
{
Debug.Print("Empty Cabinet value in Media table. This happens, but it's rare and it's weird!");//Debug.Fail("Couldn't find media CAB file inside the MSI (bad media table?).");
continue;
}
if (!string.IsNullOrEmpty(cabSourceName))
{
bool extract = false;
Expand Down
10 changes: 10 additions & 0 deletions src/Lessmsi.Tests/MiscTests.cs
Expand Up @@ -74,5 +74,15 @@ public void VBRuntime()
{
ExtractAndCompareToMaster("VBRuntime.msi");
}

/// <summary>
/// from https://github.com/activescott/lessmsi/issues/49
///
/// </summary>
[Test]
public void EmptyCabinetFieldInMediaTable()
{
ExtractAndCompareToMaster("X86 Debuggers And Tools-x86_en-us.msi");
}
}
}

0 comments on commit 03ec95a

Please sign in to comment.