Skip to content

Commit

Permalink
Release the chunk used to download files when finished
Browse files Browse the repository at this point in the history
Without this fix, a chunk is leaked for each snapshot checked
with `-files`.
  • Loading branch information
gilbertchen committed Dec 7, 2022
1 parent 58f0d2b commit b8c7594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/duplicacy_snapshotmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,10 @@ func (manager *SnapshotManager) VerifySnapshot(snapshot *Snapshot) bool {
LOG_TRACE("SNAPSHOT_VERIFY", "%s", file.Path)
}

if lastChunk != nil {
manager.config.PutChunk(lastChunk)
}

if corruptedFiles > 0 {
LOG_WARN("SNAPSHOT_VERIFY", "Snapshot %s at revision %d contains %d corrupted files",
snapshot.ID, snapshot.Revision, corruptedFiles)
Expand Down

2 comments on commit b8c7594

@gilbertchen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/cli-release-3-1-0-is-now-available/7076/1

@gilbertchen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/history-output-question/7113/2

Please sign in to comment.