Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Fix the garbage that Directory.GetFiles returns #88

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

zkxs
Copy link
Collaborator

@zkxs zkxs commented Mar 11, 2023

Hi @Banane9, this is for you.

This fixes a bug where NML would load files like "foo.dll_disabled" because Microsoft's APIs are trash.

@Banane9
Copy link
Contributor

Banane9 commented Mar 11, 2023

hey, @badhaloninja complained about that ;P

Copy link
Contributor

@Banane9 Banane9 left a comment

Choose a reason for hiding this comment

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

5/7, perfect fix

@zkxs
Copy link
Collaborator Author

zkxs commented Mar 11, 2023

hey, @badhaloninja complained about that ;P

oh my god what

both of your names are green and start with "B", and I'll be straight with you, that's 100% how my brain works.

@zkxs zkxs merged commit 8ccc47e into master Mar 11, 2023
@zkxs zkxs deleted the why-the-hell-did-microsoft-think-this-was-a-good-idea branch March 11, 2023 16:33
// Directory.GetFiles and Directory.EnumerateFiles have a fucked up API: https://learn.microsoft.com/en-us/dotnet/api/system.io.directory.getfiles?view=netframework-4.6.2#system-io-directory-getfiles(system-string-system-string-system-io-searchoption)
// long story short if I searched for "*.dll" it would unhelpfully use some incredibly inconsistent behavior and return results like "foo.dll_disabled"
// So I have to filter shit after the fact... ugh
Logger.DebugInternal("I'm morbing");
Copy link
Member

Choose a reason for hiding this comment

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

huehue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants