diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-04 10:32:16 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-04 10:32:16 +0100 |
| commit | 3cb8d5ce252c246e2218a05968dc10db38116994 (patch) | |
| tree | 46e0f1addafd7a6f484f0c14710a11e2e3b2926a | |
| parent | 3f4f5aeb94f5675def64c386775bc7776fa9cc1c (diff) | |
config localtion
| -rw-r--r-- | src/linux/platform.c | 4 | ||||
| -rw-r--r-- | src/windows/platform.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/linux/platform.c b/src/linux/platform.c index 140715b..855564b 100644 --- a/src/linux/platform.c +++ b/src/linux/platform.c @@ -140,7 +140,7 @@ void platform_create_config_directory() { char *env = getenv("HOME"); char tmp[PATH_MAX]; - snprintf(tmp, PATH_MAX, "%s%s", env, "/.config/moedit"); + snprintf(tmp, PATH_MAX, "%s%s", env, CONFIG_DIRECTORY); if (!platform_directory_exists(tmp)) { @@ -151,7 +151,7 @@ void platform_create_config_directory() char* get_config_save_location(char *buffer) { char *env = getenv("HOME"); - snprintf(buffer, PATH_MAX, "%s%s", env, "/.config/moedit/config.txt"); + snprintf(buffer, PATH_MAX, "%s%s", env, CONFIG_DIRECTORY"/config.txt"); return buffer; } diff --git a/src/windows/platform.c b/src/windows/platform.c index 24fd6f6..4b9ae61 100644 --- a/src/windows/platform.c +++ b/src/windows/platform.c @@ -285,7 +285,7 @@ void platform_create_config_directory() char tmp[PATH_MAX]; if(SUCCEEDED(SHGetFolderPathA(0, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, tmp))) { - string_appendn(tmp, "/moedit", PATH_MAX); + string_appendn(tmp, CONFIG_DIRECTORY, PATH_MAX); } @@ -299,7 +299,7 @@ char* get_config_save_location(char *buffer) { if(SUCCEEDED(SHGetFolderPathA(0, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, buffer))) { - string_appendn(buffer, "\\moedit\\config.txt", MAX_INPUT_LENGTH); + string_appendn(buffer, CONFIG_DIRECTORY"\\config.txt", MAX_INPUT_LENGTH); return buffer; } |
