]> git.sur5r.net Git - bacula/bacula/commitdiff
Second correct fix to bug #1524 verify fails after adding or removing files
authorKern Sibbald <kern@sibbald.com>
Sat, 6 Mar 2010 16:02:35 +0000 (17:02 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 6 Mar 2010 16:02:35 +0000 (17:02 +0100)
bacula/src/cats/sql_get.c
bacula/src/dird/verify.c

index 6582a153707eb961fdc262e978f9e7cabd65f9f2..b5e9c9677df69471b0675b543a66fe7a255cda49 100644 (file)
@@ -124,16 +124,6 @@ int db_get_file_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr, FILE_DBR *fdbr)
       edit_int64(fdbr->PathId, ed1), 
       edit_int64(fdbr->FilenameId, ed2), 
       edit_int64(jr->ClientId,ed3));
-
-   } else if (jr != NULL) {
-      /* Called from Verify so jr->FileIndex is valid */
-      Mmsg(mdb->cmd,
-"SELECT FileId, LStat, MD5 FROM File WHERE File.JobId=%s AND File.PathId=%s AND "
-"File.FilenameId=%s AND FileIndex=%u", 
-      edit_int64(fdbr->JobId, ed1), 
-      edit_int64(fdbr->PathId, ed2), 
-      edit_int64(fdbr->FilenameId,ed3),
-      jr->FileIndex);
    } else {
       Mmsg(mdb->cmd,
 "SELECT FileId, LStat, MD5 FROM File WHERE File.JobId=%s AND File.PathId=%s AND "
index b810f139c08b381bef591a8988746161fae26328..d288aa237701670fa963631046a72237bc3d8fee 100644 (file)
@@ -603,7 +603,7 @@ void get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
           */
          fdbr.FileId = 0;
          if (!db_get_file_attributes_record(jcr, jcr->db, jcr->fname,
-              NULL, &fdbr)) {
+              &jcr->previous_jr, &fdbr)) {
             Jmsg(jcr, M_INFO, 0, _("New file: %s\n"), jcr->fname);
             Dmsg1(020, _("File not in catalog: %s\n"), jcr->fname);
             set_jcr_job_status(jcr, JS_Differences);