summary refs log tree commit diff stats
path: root/src/common/cfgfiles.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-02-16 15:28:44 +0100
committerBerke Viktor <bviktor@hexchat.org>2013-02-16 15:28:44 +0100
commite41a84b094e514f7ce237d9108e59c02156f4849 (patch)
tree9eb04371d1097f5fe789730d39d6e8bf203eaa21 /src/common/cfgfiles.c
parentef18734f2042ce8bfd11cc508bc803de555e495a (diff)
Try to create the addons folder initially
Diffstat (limited to 'src/common/cfgfiles.c')
-rw-r--r--src/common/cfgfiles.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index fd037525..6b06812b 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -619,7 +619,7 @@ convert_with_fallback (const char *str, const char *fallback)
 void
 load_config (void)
 {
-	char *cfg, *sp;
+	char *cfg, *sp, *buf;
 	const char *username, *realname;
 	int res, val, i;
 #ifdef WIN32
@@ -834,6 +834,10 @@ load_config (void)
 
 		g_mkdir (prefs.hex_dcc_dir, 0700);
 		g_mkdir (prefs.hex_dcc_completed_dir, 0700);
+
+		buf = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons", get_xdir ());
+		g_mkdir (buf, 0700);
+		g_free (buf);
 	}
 	if (prefs.hex_gui_win_height < 138)
 		prefs.hex_gui_win_height = 138;