aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-26 21:27:34 +0100
committerGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-26 21:27:34 +0100
commitba822fa5366b4163fbfa4c2aee2ac8faedd95991 (patch)
treefcd38ad6e8103b17623c009ba2b4c5b8912ee204 /uzbl.c
parent76fc5c64883180d496842577e05423d55306ae49 (diff)
Now checks in $XDG_CONFIG_HOME/uzbl if --config is omitted.
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/uzbl.c b/uzbl.c
index 9ce5669..cd23048 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -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;
}
}
}