diff --git a/include/chat/flags.h b/include/chat/flags.h
index 44a1987..a712a7f 100644
--- a/include/chat/flags.h
+++ b/include/chat/flags.h
@@ -29,7 +29,8 @@ along with this program. If not, see .
#define WHY2_INVALID_POINTER (void*) 0xffffffffffffffff
-#define WHY2_CHAT_CONFIG_DIR "/home/{USER}/.config/WHY2"
+#define WHY2_CONFIG_DIR "/home/{USER}/.config"
+#define WHY2_CHAT_CONFIG_DIR WHY2_CONFIG_DIR "/WHY2"
#define WHY2_CHAT_CONFIG_URL "https://raw.githubusercontent.com/ENGO150/WHY2/development/src/chat/"
#define WHY2_CHAT_CONFIG_SERVER "server.yml"
#define WHY2_CHAT_CONFIG_CLIENT "client.yml"
diff --git a/src/chat/config.c b/src/chat/config.c
index c065632..d078f60 100644
--- a/src/chat/config.c
+++ b/src/chat/config.c
@@ -34,6 +34,14 @@ along with this program. If not, see .
//LOCAL
void init_config(char *filename)
{
+ struct stat st;
+
+ //CREATE USER CONFIG FOLDER [THIS SHOULDN'T HAPPEN ON CLIENT, BUT IT'S NEEDED ON FRESH SERVERS]
+ if (stat(WHY2_CONFIG_DIR, &st) == -1)
+ {
+ mkdir(WHY2_CONFIG_DIR, 0700);
+ }
+
//GET THE CONFIG TYPE
char *buffer = why2_malloc(strlen(WHY2_CHAT_CONFIG_DIR) + strlen(filename) + 2);
sprintf(buffer, "%s/%s", WHY2_CHAT_CONFIG_DIR, filename);