about summary refs log tree commit diff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/config.c b/config.c
index b3e42f9..3bf56c0 100644
--- a/config.c
+++ b/config.c
@@ -24,8 +24,6 @@
 
 #include "chat.h"
 
-#define CONFIG_DIR "catgirl"
-
 FILE *configOpen(const char *path, const char *mode) {
 	if (path[0] == '/' || path[0] == '.') goto local;
 
@@ -35,10 +33,10 @@ FILE *configOpen(const char *path, const char *mode) {
 
 	char buf[PATH_MAX];
 	if (configHome) {
-		snprintf(buf, sizeof(buf), "%s/" CONFIG_DIR "/%s", configHome, path);
+		snprintf(buf, sizeof(buf), "%s/" XDG_SUBDIR "/%s", configHome, path);
 	} else {
 		if (!home) goto local;
-		snprintf(buf, sizeof(buf), "%s/.config/" CONFIG_DIR "/%s", home, path);
+		snprintf(buf, sizeof(buf), "%s/.config/" XDG_SUBDIR "/%s", home, path);
 	}
 	FILE *file = fopen(buf, mode);
 	if (file) return file;
@@ -48,7 +46,7 @@ FILE *configOpen(const char *path, const char *mode) {
 	while (*configDirs) {
 		size_t len = strcspn(configDirs, ":");
 		snprintf(
-			buf, sizeof(buf), "%.*s/" CONFIG_DIR "/%s",
+			buf, sizeof(buf), "%.*s/" XDG_SUBDIR "/%s",
 			(int)len, configDirs, path
 		);
 		file = fopen(buf, mode);