]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix bug #2452 VerifyToCatalog reports deleted files as being new
authorKern Sibbald <kern@sibbald.com>
Mon, 4 Feb 2019 11:19:51 +0000 (12:19 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 4 Feb 2019 11:19:51 +0000 (12:19 +0100)
bacula/src/dird/verify.c

index 5db16b06768a97a65961d5ff9b495114dde58361..c0486ee931c5905c2fa27bc9759dbc3b0a5ca95c 100644 (file)
@@ -676,6 +676,10 @@ void get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
           * Find equivalent record in the database
           */
          fdbr.FileId = 0;
+         /* Don't look for deleted records */
+         if (jcr->FileIndex <= 0) {
+            continue;
+         }
          if (!db_get_file_attributes_record(jcr, jcr->db, jcr->fname,
               &jcr->previous_jr, &fdbr)) {
             Jmsg(jcr, M_INFO, 0, _("New file: %s\n"), jcr->fname);