Fix occurrences of Platform.IsMono
Closed this issue · 0 comments
We no longer run Chorus tests under mono, and there are a few places where IsMono is being used as a substitute for IsLinux which are no longer correct. This results in Windows-only code such as LongToShortConverter.GetShortPathName being run on Linux when it shouldn't be.
We should go through, find all occurrences of Platform.IsMono, and update them to match the check that's actually needed. In some cases, where the check is working around a Mono-only bug, the check should stay as-is. But in other cases, we actually want to know if we're running on Windows or not, so we should really be checking Platform.IsWindows or Platform.IsUnix. Otherwise LfMerge and other code running on Linux using dotnet will be running the wrong code branch.