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-5.0.2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=070796b39243acb1c9d85177c2491f029b65aeed;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;