Make File.Exists case insensitive for linux (gtk)
Closed this issue · 4 comments
(for .txt files like Game/game, Labels/labels, etc.)
See here:
Civ2-clone/Engine/src/Utils.cs
Lines 27 to 62 in 589361d
Windows (WinForms) doesn't have this problem.
If you are in-charge of extracting assets, maybe a one-time upon boot change to the files to be consistently lowercase or uppercase would avoid the need to worry about this during the game?
You mean scanning all the files and changing their case? I'll have to think about it, I'm more in favour of programmatically ignoring the case instead of changing the actual names of files. (or did I misinterpret what you wrote?)
I was suggesting a one-time action of scanning files when extracting (so you'd already be scanning them), but converting their saved paths to be lowercase (or uppercase, consistent casing is the core of this).
I did some adjustments so that it can read files on Linux, even when files are upper/lower case.