summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-13 10:49:11 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-10-13 10:49:29 +0200
commit05b6e0b330f423d5b163c07fffb1183abe75c3fa (patch)
treed70f8ae17d7284bc2c7712849a85760ffe6bff02 /src/common
parentdfd4828ad29b96d69c901b9f254de70594f88c60 (diff)
By default, use <config>/downloads for DCC file transfers when in portable mode
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cfgfiles.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index f3bb54b8..61df96c6 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -763,11 +763,14 @@ load_config (void)
 	{
 		char out[256];
 
-		if (get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\"
-						 "Explorer\\Shell Folders", "Personal", out, sizeof (out)))
-			snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out);
+		if (portable_mode () || !get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", out, sizeof (out)))
+		{
+			snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\downloads", get_xdir_utf8 ());
+		}
 		else
-			snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", get_xdir_utf8 ());
+		{
+			snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out);
+		}
 	}
 #else
 	snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ());