GetStringHashCode needs to normalize path case on Windows
KirillOsenkov opened this issue · 0 comments
On Windows, depending on whether you type cd /d C:\temp
or cd /d c:\temp
you're going to end up in either C:\>
or c:\>
command prompt. In other words, the casing of the drive letter is what you typed when you switched to it.
The case of the drive letter propagates all the way to here:
https://github.com/mono/mono-addins/blob/master/Mono.Addins/Mono.Addins.Database/FileDatabase.cs#L472
So when we compute the hash of the file path the casing of the drive letter in that path will be what your command prompt was at the time of starting the process. This will result in failing to hit the cache if the path is different and weird errors with addins unable to be installed.
Huge props to @ToddGrun who figured out the root cause.