]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #1559 problem when restoring pruned jobs with a regexp
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 24 Apr 2010 16:21:36 +0000 (18:21 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 24 Apr 2010 16:22:12 +0000 (18:22 +0200)
bacula/src/dird/bsr.c

index 8390861fa655f4c80daf0fc21a955bea2222d2b8..eefce24c7e5b882dbd498a82de4704f65632f1d4 100644 (file)
@@ -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;