Skip to content

Guard PluginLoader directory scan against enumeration exceptions#85

Open
yolkin-games wants to merge 1 commit into
rabanti-github:dev-prfrom
yolkin-games:master
Open

Guard PluginLoader directory scan against enumeration exceptions#85
yolkin-games wants to merge 1 commit into
rabanti-github:dev-prfrom
yolkin-games:master

Conversation

@yolkin-games

Copy link
Copy Markdown

LoadReferencedAssemblies calls Directory.GetFiles(AppDomain.CurrentDomain.
BaseDirectory, "*.dll") unguarded. Because this runs from WorkbookReader's
static constructor, any throw (e.g. IOException 'The parameter is incorrect'
when BaseDirectory holds an entry the native enumerator can't stat — seen when
the host base dir is the Unity 6000.5.x editor folder) surfaces as a
TypeInitializationException and permanently disables the reader for the whole
AppDomain.

Wrap the enumeration in try/catch and fall back to the Phase 1 (loaded-assembly)
registration result, mirroring the per-path try/catch already in the load loop.

@rabanti-github rabanti-github changed the base branch from master to dev-pr June 30, 2026 00:37
@rabanti-github rabanti-github added the pending A solution is pending or long-term work is in progress label Jun 30, 2026
@rabanti-github

Copy link
Copy Markdown
Owner

Hello,
Thank you for the PR and sorry about the long delay.
I will take care of it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending A solution is pending or long-term work is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants