From bb5e5f209e5e66e8c48b4090204a6738366d82e1 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Sun, 25 Dec 2022 12:27:40 +0300 Subject: [PATCH] fix(cli): a little bug fix --- src/cli.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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);