fix(cli): a little bug fix

This commit is contained in:
Masahiko AMANO 2022-12-25 12:27:40 +03:00
parent d148ca3e19
commit bb5e5f209e

View File

@ -381,9 +381,8 @@ int cli(int argc, char **argv) {
opt_s = 0; opt_s = 0;
opt_u = 0; opt_u = 0;
} }
FILE *config = fopen(config_path, "r"); if (tanabata_open(&tanabata, tanabata_path) != 0) {
if (config == NULL) { fprintf(stderr, ERROR("Failed to load database\n"));
fprintf(stderr, ERROR("Config file not found\n"));
return 1; return 1;
} }
free(tanabata_path); free(tanabata_path);