SoapboxRaceWorld / GameLauncher_NFSW

An unofficial launcher for Need for Speed: World (https://launcher.worldunited.gg / https://soapboxrace.world)
GNU General Public License v3.0
425 stars 129 forks source link

Bug: "Calculating Game Folder Size" when non-english characters are used for Game Path #242

Open DavidCarbon opened 1 year ago

DavidCarbon commented 1 year ago

Test Path (String): G:\Soapbox Race World\Game Files Ö Test

03/06/2023 [      DEBUG] G:\Soapbox Race World\Game Files ?? Test
03/06/2023 [      ERROR] NEW DOWNLOAD GAME FILES: Illegal characters in path.
03/06/2023 [ ERROR CODE] NEW DOWNLOAD GAME FILES: -2147024809
03/06/2023 [ FULL ERROR] NEW DOWNLOAD GAME FILES: System.ArgumentException: Illegal characters in path.
   at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.IO.DirectoryInfo.Init(String path, Boolean checkHost)
   at System.IO.DirectoryInfo..ctor(String path)
   at SBRW.Launcher.App.UI_Forms.Main_Screen.Screen_Main.Game_Pack_Downloader() in F:\GitHub Projects\SBRW.Launcher.Net\SBRW.Launcher.Net\App\UI_Forms\Main_Screen\Screen_Main.cs:line 3535
   at SBRW.Launcher.App.UI_Forms.Main_Screen.Screen_Main.<>c__DisplayClass189_0.<Game_Downloaders>b__0() in F:\GitHub Projects\SBRW.Launcher.Net\SBRW.Launcher.Net\App\UI_Forms\Main_Screen\Screen_Main.cs:line 3800

As shown above when the launcher reads the ini files, the Ini library only reads the data in ASCII instead of UTF8. In other words, the launcher only reads English characters for values. The library can save the ini files in UTF8 but not vise versa.

This has been fixed (on the library side): https://github.com/DavidCarbon-SBRW/SBRW.Ini.Parser/commit/c6affb978ded2496521a6302ad8b63ad107a094d

A fix will be released by the end of the week