diff --git a/src/cli.c b/src/cli.c index 7a463c2..ac5b958 100644 --- a/src/cli.c +++ b/src/cli.c @@ -381,9 +381,8 @@ int cli(int argc, char **argv) { opt_s = 0; opt_u = 0; } - FILE *config = fopen(config_path, "r"); - if (config == NULL) { - fprintf(stderr, ERROR("Config file not found\n")); + if (tanabata_open(&tanabata, tanabata_path) != 0) { + fprintf(stderr, ERROR("Failed to load database\n")); return 1; } free(tanabata_path);