diff --git a/src/update.c b/src/update.c index 5f9b392..1487645 100644 --- a/src/update.c +++ b/src/update.c @@ -90,13 +90,11 @@ cve_string *get_db_path(const char *path) } if (mkdir(dir, mode)) { - struct stat st = { .st_ino = 0, }; - if (errno != EEXIST) { return NULL; } - if (stat(dir, &st) || !S_ISDIR(st.st_mode)) { + if (!cve_is_dir(dir)) { return NULL; } }