From 464a7dbd58e2e66fd2927933bb07abdb6fb6f046 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 24 Apr 2010 18:21:36 +0200 Subject: [PATCH] Fix #1559 problem when restoring pruned jobs with a regexp --- bacula/src/dird/bsr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bacula/src/dird/bsr.c b/bacula/src/dird/bsr.c index 8390861fa6..eefce24c7e 100644 --- a/bacula/src/dird/bsr.c +++ b/bacula/src/dird/bsr.c @@ -557,8 +557,15 @@ void add_findex_all(RBSR *bsr, uint32_t JobId) /* Add new JobId at end of chain */ for (nbsr=bsr; nbsr->next; nbsr=nbsr->next) { } + nbsr->next = new_bsr(); nbsr->next->JobId = JobId; + + /* If we use regexp to restore, set it for each jobid */ + if (bsr->fileregex) { + nbsr->next->fileregex = bstrdup(bsr->fileregex); + } + nbsr->next->fi = new_findex(); nbsr->next->fi->findex = 1; nbsr->next->fi->findex2 = INT32_MAX; -- 2.39.5