Skip to content

Commit

Permalink
Fixed a bug that referenced uninitialized operator.snapshotCache
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertchen committed Jul 10, 2022
1 parent fc2386f commit 54952ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duplicacy_chunkoperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (operator *ChunkOperator) UploadChunk(threadIndex int, task ChunkTask) bool
chunk.VerifyID()
}

if task.isMetadata && operator.storage.IsCacheNeeded() {
if task.isMetadata && operator.snapshotCache != nil && operator.storage.IsCacheNeeded() {
// Save a copy to the local snapshot.
chunkPath, exist, _, err := operator.snapshotCache.FindChunk(threadIndex, chunkID, false)
if err != nil {
Expand Down

1 comment on commit 54952ce

@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/exit-status-101/6495/6

Please sign in to comment.