Skip to content

gdbusaddress, win32: backport using cwd for running rundll32

This is a minimal change to fix #1566 - 4ed5abda cherry-picked from master without changes. It is still using rundll32 for running win32 session dbus, but uses CreateProcess cwd argument instead of relying on short names.

Closes: https://gitlab.gnome.org/GNOME/glib/issues/1566

Short names were used in win32 implementation to allow launching on installations where full path to libgio-2.0-0.dll contain spaces. However, short names are optional on windows: so if they were disabled that method fails - see issue linked above.

Since rundll32 doesn't support neither spaces, nor quotes in cmdline this patch changes rundll32 argument to just .\gio-dll-name.dll and uses the entire path directory containing gio dll as rundll32 current directory.

Added comments informing about potential subtleties discovered during writing test for gdbusaddress on win32. There are not known to have real-world user-visible effect, so by now I'm only adding comments without creating issues.

Merge request reports