Skip to content

Instantly share code, notes, and snippets.

@d235j
Created January 12, 2012 04:34
Show Gist options
  • Select an option

  • Save d235j/1598701 to your computer and use it in GitHub Desktop.

Select an option

Save d235j/1598701 to your computer and use it in GitHub Desktop.
gdbusprivate hardcoded path fix
--- gio/gdbusprivate.c.orig 2012-01-11 23:32:32.000000000 -0500
+++ gio/gdbusprivate.c 2012-01-11 23:32:35.000000000 -0500
@@ -2052,17 +2052,12 @@
/* TODO: use PACKAGE_LOCALSTATEDIR ? */
ret = NULL;
first_error = NULL;
- if (!g_file_get_contents ("/var/lib/dbus/machine-id",
+ if (!g_file_get_contents ("@@PREFIX@@/var/lib/dbus/machine-id",
&ret,
NULL,
- &first_error) &&
- !g_file_get_contents ("/etc/machine-id",
- &ret,
- NULL,
- NULL))
+ error))
{
- g_propagate_prefixed_error (error, first_error,
- _("Unable to load /var/lib/dbus/machine-id or /etc/machine-id: "));
+ g_prefix_error (error, _("Unable to load @@PREFIX@@/var/lib/dbus/machine-id: "));
}
else
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment