stefankueng / grepWin

A powerful and fast search tool using regular expressions
https://tools.stefankueng.com/grepWin.html
GNU General Public License v3.0
1.74k stars 180 forks source link

correct portable detection #403

Closed jdknight closed 1 year ago

jdknight commented 1 year ago

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: