]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Handle incr/diff jobs in test-plugin-fd.c
authorEric Bollengier <eric@baculasystems.com>
Wed, 25 May 2022 20:50:30 +0000 (22:50 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
bacula/src/plugins/fd/test-plugin-fd.c

index ad44d1a5cdce11f2fadb95e11c551a3de8208ce6..cca2b59c43873c002fb568c95ea6574b0d535465 100644 (file)
@@ -413,6 +413,16 @@ static bRC startBackupFile(bpContext *ctx, struct save_pkt *sp)
       return bRC_Error;
    }
    Dmsg1(0, "nb_obj = %d\n", p_ctx->nb_obj);
+   if (p_ctx->job_level != 'F') {
+      if (p_ctx->nb_obj++ == 1) {
+         return bRC_Stop;
+      }
+      sp->type = FT_REG;
+      sp->link = sp->fname = p_ctx->fname;
+      stat(p_ctx->reader, &sp->statp);
+      return bRC_OK;
+   }
+
    if (p_ctx->nb_obj == 0) {
       sp->fname = (char *)"takeme.h";
       bfuncs->DebugMessage(ctx, fi, li, dbglvl, "AcceptFile=%s = %d\n",