diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index c6a178773..f50c0bea2 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -471,7 +471,7 @@ nextFile: // map. desired := fileDeletions[candidate.Name] if err := f.renameFile(candidate, desired, fi, snap, dbUpdateChan, scanChan); err != nil { - l.Debugln("rename shortcut for %s failed: %S", fi.Name, err.Error()) + l.Debugf("rename shortcut for %s failed: %s", fi.Name, err.Error()) // Failed to rename, try next one. continue } diff --git a/lib/model/requests_test.go b/lib/model/requests_test.go index 444b6d6d4..87aba6d34 100644 --- a/lib/model/requests_test.go +++ b/lib/model/requests_test.go @@ -720,8 +720,6 @@ func TestRequestRemoteRenameChanged(t *testing.T) { } var gotA, gotB, gotConfl bool - bIntermediateVersion := protocol.Vector{}.Update(fc.id.Short()).Update(myID.Short()) - bFinalVersion := bIntermediateVersion.Copy().Update(fc.id.Short()) done := make(chan struct{}) fc.mut.Lock() fc.indexFn = func(_ context.Context, folder string, fs []protocol.FileInfo) { @@ -742,16 +740,12 @@ func TestRequestRemoteRenameChanged(t *testing.T) { if gotB { t.Error("Got more than one index update for", f.Name) } - if f.Version.Equal(bIntermediateVersion) { + if f.Version.Counter(fc.id.Short()) == 0 { // This index entry might be superseeded // by the final one or sent before it separately. break } - if f.Version.Equal(bFinalVersion) { - gotB = true - break - } - t.Errorf("Got unexpected version %v for file %v in index update", f.Version, f.Name) + gotB = true case strings.HasPrefix(f.Name, "b.sync-conflict-"): if gotConfl { t.Error("Got more than one index update for conflicts of", f.Name)