]> granicus.if.org Git - vnstat/commitdiff
ignore anything that starts with the database name during legacy db import instead...
authorTeemu Toivola <git@humdi.net>
Wed, 8 May 2019 20:10:59 +0000 (23:10 +0300)
committerTeemu Toivola <git@humdi.net>
Wed, 8 May 2019 20:10:59 +0000 (23:10 +0300)
src/daemon.c

index 87e3db06763abc7b632081d1748e3f88b60c09cb..6c08993f6864ad9e614c705e8c16f563f58277f6 100644 (file)
@@ -325,7 +325,7 @@ unsigned int importlegacydbs(DSTATE *s)
 
        s->dbifcount = 0;
        while ((di = readdir(dir))) {
-               if ((di->d_name[0] != '.') && (strcmp(di->d_name, DATABASEFILE) != 0)) {
+               if ((di->d_name[0] != '.') && (strncmp(di->d_name, DATABASEFILE, strlen(DATABASEFILE)) != 0)) {
                        /* ignore already known interfaces */
                        if (db_getinterfacecountbyname(di->d_name)) {
                                continue;