Closed Adda0 closed 8 months ago
The path
parameter for Directory.EnumerateFiles
is case-insensitive, per Microsoft's documentation.
Are you seeing behavior that shows otherwise?
Interesting, since I do see a different behaviour on Linux. With this option enabled, I can see more mods in the mod list, the linked mod, for example. In my mod folder, this fix shows about 17 more mods in 2845 installed mods in total.
Is it possible that there is an inconsistency between Windows and Linux?
Although, I see that the case-insensitive path is only the path to the directory, not necessarily the file name: Enumeratefiles(String, String) in Microsoft documentation:
searchPattern
[String](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-7.0)
The search string to match against the names of files in path. This parameter can contain a combination of valid **literal** path and wildcard (* and ?) characters, but it doesn't support regular expressions.
Seems like we both are looking at the wrong method, as I had mistakenly linked Directory.EnumerateFiles
instead of DirectoryInfo.EnumerateFiles
. The latter does not mention case-sensitivity, though I am still not able to replicate the issue on my Windows system.
I will boot up my Linux environment shortly to double check and will merge this over once I can confirm it.
Merged!
Thank you for your patience as we worked through this. It is always fun when issues occur due to OS differences!
I am not sure if "fun" is the word I would use, though. Trying to work out the differences between different OSes is a never-ending story of pain and suffering, from my experience :slightly_smiling_face: I am glad we figured this one out.
This PR fixes once place in the code where variations of
manifest.json
, namelyManifest.json
, are not considered, resulting in omission of some mods from the mod list.Tested on Linux, not tested on Windows or MacOS.
Example mod with
Manifest.json
for testing purposes.