about summary refs log tree commit diff stats
path: root/xxxterm.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2010-08-10 21:43:00 +0000
committerMarco Peereboom <marco@conformal.com>2010-08-10 21:43:00 +0000
commit0cc09911f9d8aff3d0ae6ee042140cedeb32209b (patch)
tree8d64b86490133f63eb68a51396cbe97828ec4500 /xxxterm.c
parentd3a5449258ccef30756775adac75d19e294e7b5a (diff)
downloadxombrero-0cc09911f9d8aff3d0ae6ee042140cedeb32209b.tar.gz
make sure we dont clobber the home dir when there is no config file
found by oga
Diffstat (limited to 'xxxterm.c')
-rw-r--r--xxxterm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 55c6e51..c7636d1 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -50,7 +50,6 @@
 
 static char		*version = "$xxxterm$";
 
-#define XT_DEBUG
 /* #define XT_DEBUG */
 #ifdef XT_DEBUG
 #define DPRINTF(x...)		do { if (swm_debug) fprintf(stderr, x); } while (0)
@@ -2179,6 +2178,9 @@ main(int argc, char *argv[])
 	config_parse(conf);
 
 	/* download dir */
+	if (!strcmp(download_dir, pwd->pw_dir))
+		strlcat(download_dir, "/downloads", sizeof download_dir);
+
 	if (stat(download_dir, &sb))
 		errx(1, "must specify a valid download_dir");
 	if (S_ISDIR(sb.st_mode) == 0)