The above code incorrectly sets the platform to iOS if the user just happens to have the specified folders in the root of the drive of the current working directory.
To replicate, simply make an Applications and System folder in the drive you are running monomod from.
I don't know what a proper fix would be, but Applications and System are common enough that some users on Windows or other platforms might run into this.
A solution might just be continuing the previous if-else chain, or check if it is still unknown at this point.
https://github.com/MonoMod/MonoMod.Common/blob/fed55e9634c64da1062f6e85099c0b334668a0f6/Utils/PlatformHelper.cs#L52-L56
The above code incorrectly sets the platform to iOS if the user just happens to have the specified folders in the root of the drive of the current working directory.
To replicate, simply make an
Applications
andSystem
folder in the drive you are running monomod from.I don't know what a proper fix would be, but
Applications
andSystem
are common enough that some users on Windows or other platforms might run into this.A solution might just be continuing the previous if-else chain, or check if it is still unknown at this point.