summary refs log tree commit diff stats
path: root/src/common/cfgfiles.c
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-02-18 00:30:57 -0500
committerTingPing <tngpng@gmail.com>2013-02-18 00:30:57 -0500
commitbcb2107bb189c6b3afbe75e2e2bcc5d56bb2d9ff (patch)
tree3c6a5af3c29d5b19226ae3d90f2604f1565e465f /src/common/cfgfiles.c
parent3915abc91eb0d0f0ebe73d508009a146ca5d7fdb (diff)
Fallback to $HOME/Downloads for dcc_dir
Diffstat (limited to 'src/common/cfgfiles.c')
-rw-r--r--src/common/cfgfiles.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 5c42ff60..9aac5a4f 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -754,7 +754,10 @@ load_config (void)
 		snprintf (prefs.hex_dcc_dir, sizeof (prefs.hex_dcc_dir), "%s\\Downloads", out);
 	}
 #else
-	strcpy (prefs.hex_dcc_dir, g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD));
+	if (g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD))
+		strcpy (prefs.hex_dcc_dir, g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD));
+	else
+		strcpy (prefs.hex_dcc_dir, g_build_filename (g_get_home_dir (), "Downloads", NULL));
 #endif
 	strcpy (prefs.hex_dnsprogram, "host");
 	strcpy (prefs.hex_gui_ulist_doubleclick, "QUERY %s");