Skip to content

Commit

Permalink
ignore directories when searching for legacy databases to import
Browse files Browse the repository at this point in the history
  • Loading branch information
vergoh committed Dec 28, 2023
1 parent 339e4e3 commit c5718a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ unsigned int importlegacydbs(void)
}

while ((di = readdir(dir))) {
if ((di->d_name[0] != '.') && (strncmp(di->d_name, DATABASEFILE, strlen(DATABASEFILE)) != 0)) {
if ((di->d_name[0] != '.') && (di->d_type != DT_DIR) && (strncmp(di->d_name, DATABASEFILE, strlen(DATABASEFILE)) != 0)) {
/* ignore already known interfaces */
if (db_getinterfacecountbyname(di->d_name)) {
continue;
Expand Down

0 comments on commit c5718a3

Please sign in to comment.