From a181dfa82ce24e1cf671e7d105741436e1a147c9 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 13 Aug 2013 15:48:55 +0200 Subject: [PATCH] On windows add executable extension to dbus service client programs if not present. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44030 --- dbus/dbus-spawn-win.c | 13 +++++++++++++ 1 Datei geändert, 13 Zeilen hinzugefügt(+) diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c index bf5ca71..508ea5e 100644 --- a/dbus/dbus-spawn-win.c +++ b/dbus/dbus-spawn-win.c @@ -580,6 +580,19 @@ spawn_program (char* name, char** argv, char** envp) _dbus_string_append (&app_name, name); + // add exe extension, if not present + if (!strrchr (name, '.')) + { + if (!_dbus_string_append (&app_name, ".exe")) + { + _dbus_string_free (&app_name); + _dbus_verbose ("could not add extension to %s\n", _dbus_string_get_data (&app_name)); + return INVALID_HANDLE_VALUE; + } + else + _dbus_verbose ("added exe extension %s\n", _dbus_string_get_data (&app_name)); + } + if (!SearchPathA (app_path, _dbus_string_get_data (&app_name), NULL, -- 1.7.10.4