g_win32_get_package_installation_directory_of_module() incorrectly handles bin and lib folders
@pgriffis
Submitted by Patrick Griffis Link to original bug (#739835)
Description
The documentation says that "If that directory's last component is "bin" or "lib", its parent directory is returned, otherwise the directory itself." but the actual behavior is that it cuts the directory at any occurrence of bin or lib.
For example "C:\bin\MyProgram\bin\program.exe" will return "C:" instead of "C:\bin\MyProgram".
The issue in code is pretty obvious that it just loops over checking each dir for bin/lib and breaks.