From: Eric Bollengier Date: Sat, 24 Apr 2010 16:21:36 +0000 (+0200) Subject: Fix #1559 problem when restoring pruned jobs with a regexp X-Git-Tag: Release-7.0.0~1874 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=464a7dbd58e2e66fd2927933bb07abdb6fb6f046;p=bacula%2Fbacula Fix #1559 problem when restoring pruned jobs with a regexp --- 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;