Skip to content

Commit

Permalink
dird: add correct range instead of all files
Browse files Browse the repository at this point in the history
CreateRestoreBootstrapFile() should add all files from
its related job (by number) and not [1,INT32_MAX].
  • Loading branch information
arogge committed Jul 5, 2019
1 parent 39cfe8d commit 8eb5367
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/dird/job.cc
Expand Up @@ -1851,20 +1851,22 @@ int CreateRestoreBootstrapFile(JobControlRecord* jcr)
files = -1;
goto bail_out;
}
rx.bsr->fi->addAll();
for (auto fi = 1; fi <= jcr->previous_jr.JobFiles; fi++) {
rx.bsr->fi->add(fi);
}
jcr->ExpectedFiles = WriteBsrFile(ua, rx);
if (jcr->ExpectedFiles == 0) {
files = 0;
goto bail_out;
}
FreeUaContext(ua);
rx.bsr.reset(nullptr);
rx.bsr.reset(nullptr);
jcr->needs_sd = true;
return jcr->ExpectedFiles;

bail_out:
FreeUaContext(ua);
rx.bsr.reset(nullptr);
rx.bsr.reset(nullptr);
return files;
}

Expand Down

0 comments on commit 8eb5367

Please sign in to comment.