1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-10 21:33:19 +00:00

Fixed a bug that referenced uninitialized operator.snapshotCache

This commit is contained in:
Gilbert Chen
2022-07-10 12:23:11 -04:00
parent fc2386f9cc
commit 54952cef26

View File

@@ -489,7 +489,7 @@ func (operator *ChunkOperator) UploadChunk(threadIndex int, task ChunkTask) bool
chunk.VerifyID() chunk.VerifyID()
} }
if task.isMetadata && operator.storage.IsCacheNeeded() { if task.isMetadata && operator.snapshotCache != nil && operator.storage.IsCacheNeeded() {
// Save a copy to the local snapshot. // Save a copy to the local snapshot.
chunkPath, exist, _, err := operator.snapshotCache.FindChunk(threadIndex, chunkID, false) chunkPath, exist, _, err := operator.snapshotCache.FindChunk(threadIndex, chunkID, false)
if err != nil { if err != nil {