Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 639984c

Browse files
authored
Merge pull request #290 from ddvk/fixsync
fix: capture loop variable, should fix #285
2 parents f5278be + 32f0195 commit 639984c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

api/sync15/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func getCachedTreePath() (string, error) {
4141
return cacheFile, nil
4242
}
4343

44-
const cacheVersion = 2
44+
const cacheVersion = 3
4545

4646
func loadTree() (*HashTree, error) {
4747
cacheFile, err := getCachedTreePath()

api/sync15/tree.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ func (t *HashTree) Mirror(r RemoteStorage, maxconcurrent int) error {
212212
if entry.Hash != doc.Hash {
213213
log.Info.Println("doc updated: ", doc.DocumentID)
214214
e := entry
215+
d := doc
215216
wg.Go(func() error {
216-
return doc.Mirror(e, r)
217+
return d.Mirror(e, r)
217218
})
218219
}
219220
}

0 commit comments

Comments
 (0)