Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3372 empty tree for assembly #3373

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ICSharpCode.ILSpyX/LoadedAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async Task<LoadResult> LoadAsync(Task<Stream?>? streamTask)
}
}

if (result?.IsSuccess != true)
if (result?.IsSuccess != true || result.Package?.Kind == LoadedPackage.PackageKind.Zip) // workaround to check this before zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cannot do this, because LoadedAssembly should not need to know about any format other than PE.

{
stream.Position = 0;
try
Expand All @@ -367,7 +367,8 @@ async Task<LoadResult> LoadAsync(Task<Stream?>? streamTask)
}
catch (Exception ex)
{
result = new LoadResult { FileLoadException = ex };
if (result == null)
result = new LoadResult { FileLoadException = ex };
}
}

Expand Down
Loading