diff options
author | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 21:27:34 +0100 |
---|---|---|
committer | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 21:27:34 +0100 |
commit | ba822fa5366b4163fbfa4c2aee2ac8faedd95991 (patch) | |
tree | fcd38ad6e8103b17623c009ba2b4c5b8912ee204 /uzbl.c | |
parent | 76fc5c64883180d496842577e05423d55306ae49 (diff) |
Now checks in $XDG_CONFIG_HOME/uzbl if --config is omitted.
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -401,14 +401,15 @@ settings_init () { gchar** keyse = NULL; if (! config_file) { - char* xdg = getenv ("XDG_CONFIG_HOME"); - char* conf = NULL; + const char* xdg = getenv ("XDG_CONFIG_HOME"); + char* conf[256]; if (xdg) { + printf("XDG_CONFIG_DIR: %s\n", xdg); strcpy (conf, xdg); strcat (conf, "/uzbl"); if (file_exists (conf)) { - printf ("Config file %s found.", conf); - strcpy(config_file, conf); + printf ("Config file %s found.\n", conf); + config_file = &conf; } } } |