summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-util-win.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-10-02 16:51:59 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-10-05 16:29:54 +0100
commitf5e5894a478c0e73947432ea2cbd282a6e773a71 (patch)
tree2b995e5c36694753ca61b0d9f71ccd13debbe2c1 /dbus/dbus-sysdeps-util-win.c
parent676d9c9d129fae6a9a9b29a7f8a606df3d33a3e6 (diff)
Assume that DBUS_DATADIR is absolute on Windows
Both build systems arrange for this to be the case, and we already assume that it's absolute on Unix. On Windows, it's probably going to be /mingw/share or something; it gets relocated via _dbus_replace_install_prefix() at runtime. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83539 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'dbus/dbus-sysdeps-util-win.c')
-rw-r--r--dbus/dbus-sysdeps-util-win.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c
index 71296fa8..d38f02b0 100644
--- a/dbus/dbus-sysdeps-util-win.c
+++ b/dbus/dbus-sysdeps-util-win.c
@@ -1574,16 +1574,14 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs)
}
}
#else
-/*
- the code for accessing services requires absolute base pathes
- in case DBUS_DATADIR is relative make it absolute
-*/
{
DBusString p;
if (!_dbus_string_init (&p))
goto oom;
+ /* DBUS_DATADIR is assumed to be absolute; the build systems should
+ * ensure that. */
if (!_dbus_string_append (&p, DBUS_DATADIR) ||
!_dbus_replace_install_prefix (&p))
{
@@ -1591,18 +1589,6 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs)
goto oom;
}
- if (!_dbus_path_is_absolute (&p))
- {
- /* this only works because this is the first thing in the
- * servicedir_path; if it wasn't, we'd have to use a temporary
- * string and copy it in */
- if (!_dbus_get_install_root (&servicedir_path))
- {
- _dbus_string_free (&p);
- goto oom;
- }
- }
-
if (!_dbus_string_append (&servicedir_path,
_dbus_string_get_const_data (&p)))
{