PATCH: fix include "$(HOME)/.gconf.path"



[I already sent this to the list once without being subscribed, but it
didn't get approved by any moderator so I bit the bullet and
subscribed.]

Lines such as `include "$(HOME)/.gconf.path"' found in
/etc/gconf/1/path were not having the $(HOME) substituted before
gconf_load_source_path() was recursively called on
`$(HOME)/.gconf.path', so an strace would reveal something like:

  open("$(HOME)/.gconf.path", O_RDONLY)   = -1 ENOENT (No such file or directory)

This is trivially fixed by the following patch against current CVS.

Index: gconf/gconf-internals.c
===================================================================
RCS file: /cvs/gnome/gconf/gconf/gconf-internals.c,v
retrieving revision 1.89
diff -u -r1.89 gconf-internals.c
--- gconf/gconf-internals.c	2001/08/01 16:18:49	1.89
+++ gconf/gconf-internals.c	2001/08/08 13:39:05
@@ -833,12 +833,15 @@
         {
           gchar* unq;
           GSList* included;
+          gchar* varsubst;
 
           s += 7;
           while (isspace(*s)) s++;
           unq = unquote_string(s);
+          varsubst = subst_variables(unq);
 
-          included = gconf_load_source_path(unq, NULL);
+          included = gconf_load_source_path(varsubst, NULL);
+          g_free(varsubst);
 
           if (included != NULL)
             {


-- 
Adam Spiers -=- musician & hacker -=- adam spiers net -=- http://tigerpig.org/
echo '$_=bless[q]]],q;_;;sub s;{local$_=shift;push $_,++$0,pop(@$_).$s;;$_}($,
=eval((join"\$_->[",qw)Just Another Perl Hacker)).q)$_->[1]]]])))=~s~((?<=.(?{
++$*})))?_::~$*&&$"~egx,print""=>""=>'|perl -ln0e';s;s\;;_::AUTOLOAD$1;g;eval'




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]