Skip to content

Commit

Permalink
Ignore unreadable assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0ade committed May 10, 2018
1 parent 14b19e1 commit e0d3cff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib-projs/FNA
8 changes: 7 additions & 1 deletion src/XnaToFnaUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,13 @@ public void ScanPath(string path) {
if (!File.Exists(path + ".mdb") && !File.Exists(Path.ChangeExtension(path, "pdb")))
modReaderParams.ReadSymbols = false;
Log($"[ScanPath] Checking assembly {name.Name} ({(modReaderParams.ReadWrite ? "rw" : "r-")})");
ModuleDefinition mod = MonoModExt.ReadModule(path, modReaderParams);
ModuleDefinition mod;
try {
mod = MonoModExt.ReadModule(path, modReaderParams);
} catch (Exception e) {
Log($"[ScanPath] WARNING: Cannot load assembly: {e}");
return;
}
bool add = !modReaderParams.ReadWrite || name.Name == ThisAssemblyName;

if ((mod.Attributes & ModuleAttributes.ILOnly) != ModuleAttributes.ILOnly) {
Expand Down

0 comments on commit e0d3cff

Please sign in to comment.