From 9841e0507020fb37a0e93f737f36433f050e70e9 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 31 Oct 2015 11:00:06 +0100 Subject: [PATCH] Fix bus-test parser check error caused by using wrong runtime path of DBUS_DATADIR. --- bus/config-parser.c | 9 +++------ dbus/dbus-sysdeps-util-win.c | 2 +- dbus/dbus-sysdeps-win.h | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bus/config-parser.c b/bus/config-parser.c index 9f32b43..a7d8f96 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -3407,12 +3407,9 @@ test_default_session_servicedirs (void) const char *common_progs; char buffer[1024]; - if (_dbus_get_install_root(buffer, sizeof(buffer))) - { - strcat(buffer,DBUS_DATADIR); - strcat(buffer,"/dbus-1/services"); - test_session_service_dir_matches[0] = buffer; - } + strcpy(buffer, _dbus_windows_get_datadir ()); + strcat(buffer, "/dbus-1/services"); + test_session_service_dir_matches[0] = buffer; #endif /* On Unix we don't actually use this variable, but it's easier to handle the diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c index 3b754db..da0abe1 100644 --- a/dbus/dbus-sysdeps-util-win.c +++ b/dbus/dbus-sysdeps-util-win.c @@ -1527,7 +1527,7 @@ _dbus_replace_install_prefix (const char *configure_time_path) * @returns relocated DATADIR static string */ -static const char * +const char * _dbus_windows_get_datadir (void) { return _dbus_replace_install_prefix(DBUS_DATADIR); diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h index e9b30d7..eb583cc 100644 --- a/dbus/dbus-sysdeps-win.h +++ b/dbus/dbus-sysdeps-win.h @@ -65,6 +65,8 @@ _dbus_win32_sid_to_name_and_domain (dbus_uid_t uid, wchar_t **wdomain, DBusError *error); +const char * +_dbus_windows_get_datadir (void); /* Don't define DBUS_CONSOLE_DIR on Win32 */ -- 1.8.4.5