From 76fc5c64883180d496842577e05423d55306ae49 Mon Sep 17 00:00:00 2001 From: Barrucadu Date: Sun, 26 Apr 2009 21:10:13 +0100 Subject: Poked code a bit. Doesn't quite work. --- uzbl.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 47f5e22..9ce5669 100644 --- a/uzbl.c +++ b/uzbl.c @@ -401,10 +401,16 @@ settings_init () { gchar** keyse = NULL; if (! config_file) { - char* conf = getenv ("XDG_CONFIG_HOME"); - strcat (conf, "/uzbl"); - if (file_exists (conf)) - strcpy(config_file conf); + char* xdg = getenv ("XDG_CONFIG_HOME"); + char* conf = NULL; + if (xdg) { + strcpy (conf, xdg); + strcat (conf, "/uzbl"); + if (file_exists (conf)) { + printf ("Config file %s found.", conf); + strcpy(config_file, conf); + } + } } if (config_file) { -- cgit v1.2.3