1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

Acquire verifiedChunksLock in saveVerifiedChunks

This commit is contained in:
David Zhang
2023-03-12 21:00:51 -07:00
parent 24c2ea76b9
commit df80096cdf

View File

@@ -1019,6 +1019,8 @@ func (manager *SnapshotManager) CheckSnapshots(snapshotID string, revisionsToChe
numberOfVerifiedChunks := len(verifiedChunks)
saveVerifiedChunks := func() {
verifiedChunksLock.Lock()
defer verifiedChunksLock.Unlock()
if len(verifiedChunks) > numberOfVerifiedChunks {
var description []byte
description, err = json.Marshal(verifiedChunks)