twn_util: final cleaning up, introducton of powerful file_read()

This commit is contained in:
veclavtalica
2025-03-10 05:19:58 +03:00
parent f86f3dd41a
commit 56530f9864
11 changed files with 145 additions and 82 deletions

View File

@ -265,7 +265,7 @@ static void resolve_pack_dependencies(const char *pack_name) {
/* no package manifest provided, abort */
goto OK_NO_MANIFEST;
char *manifest_file = file_to_str(path);
char *manifest_file = file_to_str(path, NULL);
if (!manifest_file) {
CRY_PHYSFS("Pack manifest file loading failed");
goto ERR_PACK_MANIFEST_FILE_LOADING;
@ -375,7 +375,7 @@ static bool initialize(void) {
/* load the config file into an opaque table */
{
char *config_file = file_to_str("/twn.toml");
char *config_file = file_to_str("/twn.toml", NULL);
if (config_file == NULL) {
CRY("Configuration file loading failed", "Cannot access /twn.toml");
goto fail;