diff --git a/archiver/ChangeLog b/archiver/ChangeLog index 7cf3eb1f8..effff0617 100644 --- a/archiver/ChangeLog +++ b/archiver/ChangeLog @@ -1,5 +1,15 @@ 2001-04-11 Bradford Hovinen + * location.c (run_backend_proc): Make sure to search location of + XST backends + + * Makefile.am (INCLUDES): Added XST_BACKEND_LOCATION + + * archive.c (archive_set_current_location_id): Don't use different + prefixes for per-user and global locations; we are assuming here + that the only person using this globally will be root anyway + (archive_get_current_location_id): Ditto + * Makefile.am (INCLUDES): Replace obsolete hcm directory names with ximian-config diff --git a/archiver/Makefile.am b/archiver/Makefile.am index 19a33a310..160fb7517 100644 --- a/archiver/Makefile.am +++ b/archiver/Makefile.am @@ -16,6 +16,7 @@ INCLUDES = \ -DCONFIGDIR=\""/etc"\" \ -DLOCATION_DIR=\""$(datadir)/ximian-config/default"\" \ -DGLADE_DIR=\""$(datadir)/ximian-config/glade"\" \ + -DXST_BACKEND_LOCATION=\""$(datadir)/ximian-setup-tools/scripts"\" \ $(GNOME_XML_CFLAGS) \ $(LIBGLADE_CFLAGS) diff --git a/archiver/archive.c b/archiver/archive.c index 9660affec..913fea971 100644 --- a/archiver/archive.c +++ b/archiver/archive.c @@ -436,14 +436,14 @@ archive_set_current_location_id (Archive *archive, const gchar *locid) archive->current_location_id = g_strdup (locid); if (archive->is_global) - gnome_config_push_prefix ("=" LOCATION_DIR "="); + gnome_config_set_string + ("/ximian-config/config/current/global-location", + archive->current_location_id); else - gnome_config_push_prefix ("ximian-config/"); + gnome_config_set_string + ("/ximian-config/config/current/location", + archive->current_location_id); - gnome_config_set_string ("config/current/location", - archive->current_location_id); - - gnome_config_pop_prefix (); gnome_config_sync (); } @@ -466,15 +466,13 @@ archive_get_current_location_id (Archive *archive) if (archive->current_location_id == NULL) { if (archive->is_global) - gnome_config_push_prefix ("=" LOCATION_DIR "="); + archive->current_location_id = + gnome_config_get_string_with_default + ("/ximian-config/config/current/global-location=default", &def); else - gnome_config_push_prefix ("ximian-config/"); - - archive->current_location_id = - gnome_config_get_string_with_default - ("config/current/location=default", &def); - - gnome_config_pop_prefix (); + archive->current_location_id = + gnome_config_get_string_with_default + ("/ximian-config/config/current/location=default", &def); /* Create default location if it does not exist */ if (def && archive_get_location diff --git a/archiver/location.c b/archiver/location.c index 53b1b30ed..aa22cb0ca 100644 --- a/archiver/location.c +++ b/archiver/location.c @@ -1393,10 +1393,20 @@ run_backend_proc (gchar *backend_id) } else if (pid == 0) { int i; + gchar *path, *path1; dup2 (fd[0], 0); for (i = 3; i < FOPEN_MAX; i++) close (i); + path = g_getenv ("PATH"); + + if (!strstr (path, XST_BACKEND_LOCATION)) { + path1 = g_strconcat (XST_BACKEND_LOCATION, ":", path, + NULL); + setenv ("PATH", path1, TRUE); + g_free (path1); + } + args[0] = gnome_is_program_in_path (backend_id); args[1] = "--set"; args[2] = NULL;