diff options
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c index a1fc5b9..9ad9190 100644 --- a/src/utils.c +++ b/src/utils.c @@ -50,17 +50,18 @@ int str_has_suffix(const char *str, const char *suffix) void assert_db_exists(void) { - if (file_exists(DATABASE_PATH)) + const char *db_path = ftag_config_get(FC_DATABASE_PATH); + if (file_exists(db_path)) return; if (errno == ENOENT) { fprintf(stderr, "ftag: database not found at \"%s\", " "have you run \"ftag init\"?\n", - DATABASE_PATH); + db_path); } else { - perror(DATABASE_PATH); + perror(db_path); } exit(EXIT_FAILURE); } |
