aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-26 21:10:13 +0100
committerGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-26 21:10:13 +0100
commit76fc5c64883180d496842577e05423d55306ae49 (patch)
tree81f0a61b88f47ae4e1ea551484593e69cff5a235 /uzbl.c
parentc6fd63a3f2c68f4341f5392efcc07a9673470679 (diff)
Poked code a bit. Doesn't quite work.
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c14
1 files changed, 10 insertions, 4 deletions
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) {