Skip to content

Commit

Permalink
filed: reset FileIndex between iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura authored and BareosBot committed Sep 22, 2023
1 parent dce5433 commit fe908f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/findlib/find_one.cc
Expand Up @@ -970,6 +970,12 @@ int FindOneFile(JobControlRecord* jcr,
#endif

ff_pkt->LinkFI = 0;
// some codes accesses FileIndex even if the file was never send
// If we did not reset it here, they would read the file index of the
// last send file. This is obviously not great and as such we
// reset it to zero here before it can do any damage (0 is an invalid
// FileIndex).
ff_pkt->FileIndex = 0;
/* Handle hard linked files
*
* Maintain a list of hard linked files already backed up. This
Expand Down

0 comments on commit fe908f5

Please sign in to comment.