1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +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()
}
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 {