modloader
modloader copied to clipboard
Mods stop working when folder names have unusual letters
This is a weird issue that's been reported since the 0.1.x releases, I can't find the logic behind it, heavy testing needs to be made to identify the issue. It seems pretty random too.
For example:
With this Lincoln Continental from MadDriver I even had problems with the folder name that seens to be using unusuall letters. Even when putting the blank folder "Lincoln Continental Sedan (53А) 1962" without any content in the modloader directory it randomly disables other mods. Very strange and took me some time to figure it out.
This happens because Loader::ModInformation::Scan
has a ::scoped_gdir
that does not signal failure. Since we don't use WinAPI Wide API, when we go after a non-ASCII directory it'll fail and will essentially read the modloader/ directory.
Either:
- Make proper unique support.
- Or throw an exception (and of course catch it at the correct place) when
scoped_gdir
and such fails. - Or both!
Unicode support, now! :p
My two cents: https://pastebin.com/aYaBhtR5 Caused by U+200E character. Look at the "ai upscaled weapon textures + icons" folder name.