Gtk3 on Windows uses any 'bin' in a path to find application data

I’ve noticed an interesting bug with Gtk3 on Windows: when a path to a binary contains ‘bin’, Gtk3 will try to load data using that bin/, even with something like “C:\bin\foo\bar\my-project”.

Now, ‘my-project’ doesn’t have a bin/ dir with binaries and DLL’s, so Gtk3 fails. Is this correct? I’d expect Gtk3/Glib to check a ‘bin’ dir as the direct parent of a binary, not the entire path.

Yes, here’s the documentation:

If that directory’s last component is “bin” or “lib”, its parent directory is returned, otherwise the directory itself.

So I’d expect as you say that it checks the direct parent of the exe and only that.

Here’s the source code:

But actually it checks all components of the path.

Nice, thanks for the fix, Meanwhile I updated our Windows bindist to use bin/ for binaries and DLL’s, adhering to the Gtk rules.

Ah never mind, that doesn’t fix anything,