]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/accurate.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / filed / accurate.c
index aeaa29e220357138bed65740b614bfa7764d2521..04bbfe43ab168b851f7012710d2d341221a31c57 100644 (file)
@@ -215,7 +215,7 @@ static bool accurate_add_file(JCR *jcr, uint32_t len,
    /* we store CurFile, fname and ctime/mtime in the same chunk 
     * we need one extra byte to handle an empty chksum
     */
-   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+1);
+   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3);
    item->seen = 0;
 
    /* TODO: see if we can optimize this part with memcpy instead of strcpy */
@@ -258,7 +258,8 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
    char *fname;
    CurFile elt;
 
-   ff_pkt->delta_seq = -1;
+   ff_pkt->delta_seq = 0;
+   ff_pkt->accurate_found = false;
 
    if (!jcr->accurate && !jcr->rerunning) {
       return true;
@@ -278,13 +279,9 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
       goto bail_out;
    }
 
+   ff_pkt->accurate_found = true;
    ff_pkt->delta_seq = elt.delta_seq;
 
-   if (elt.seen) { /* file has been seen ? */
-      Dmsg1(dbglvl, "accurate %s (already seen)\n", fname);
-      goto bail_out;
-   }
-
    decode_stat(elt.lstat, &statc, sizeof(statc), &LinkFIc); /* decode catalog stat */
 
    if (!jcr->rerunning && (jcr->getJobLevel() == L_FULL)) {