diff options
author | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 21:10:13 +0100 |
---|---|---|
committer | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 21:10:13 +0100 |
commit | 76fc5c64883180d496842577e05423d55306ae49 (patch) | |
tree | 81f0a61b88f47ae4e1ea551484593e69cff5a235 /uzbl.c | |
parent | c6fd63a3f2c68f4341f5392efcc07a9673470679 (diff) |
Poked code a bit. Doesn't quite work.
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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) { |