diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-30 14:04:38 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-30 14:04:38 +0530 |
commit | daea73291212bce2a2f5904bb49265e987ebdf8e (patch) | |
tree | 7a883581f81297f3b1e83905bf8db0fe65f70528 | |
parent | f57f335603a13c70168b1f46332a8827c32477b2 (diff) |
msg: config.cfg must be in the working directory
-rw-r--r-- | compromyse.xyz/config.cfg (renamed from config.cfg) | 0 | ||||
-rw-r--r-- | src/msg.c | 9 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config.cfg b/compromyse.xyz/config.cfg index c785a93..c785a93 100644 --- a/config.cfg +++ b/compromyse.xyz/config.cfg @@ -133,7 +133,14 @@ run(void) nftw(assets_directory, copy_recursively, 64, FTW_PHYS | FTW_ACTIONRETVAL); free(assets_directory); - config_t *config = config_fetch_and_parse(CONFIG_FILE); + char *config_path; + asprintf(&config_path, "%s/%s", msg->base_directory, CONFIG_FILE); + config_t *config = config_fetch_and_parse(config_path); + free(config_path); + + if (config == NULL) + return EXIT_FAILURE; + list_t *resources = get_wrapped(list_find_corresponding_value_from_ptr_wrapper( config->keys, config->array_values, "resources")); |