A previous change [1] adjusted some locals to share the module's directory between the global ini-path and to forward into a new working directory change (_wchdir); however, these changes broken the portable detection logic by mixing up the usage of GetModuleDir and GetModulePath.
This commit restores the use of GetModulePath for the portable check, as well as adjusts the call to GetModuleDir to populate a variable named moduleDir (instead of modulePath; which most likely caused the incorrect optimization).
[1]: 65d06ce3d532dfda880edd764f79b1e43b69c668
With these changes:
Built an executable.
Renamed the executable to include a portable tag.
Opened the executable and closed to observed the created ini file.
Edited the ini file to enable an option (e.g. UTF-8).
Re-opened the executable and observed the INI loading as expected with the changed option.
A previous change [1] adjusted some locals to share the module's directory between the global ini-path and to forward into a new working directory change (
_wchdir
); however, these changes broken the portable detection logic by mixing up the usage ofGetModuleDir
andGetModulePath
.This commit restores the use of
GetModulePath
for the portable check, as well as adjusts the call toGetModuleDir
to populate a variable namedmoduleDir
(instead ofmodulePath
; which most likely caused the incorrect optimization).[1]: 65d06ce3d532dfda880edd764f79b1e43b69c668
With these changes: