Factor server side move detection

This commit is contained in:
ncw
2017-01-10 20:03:55 +00:00
committed by Nick Craig-Wood
parent aa62e93094
commit 4aae7bcca6
3 changed files with 15 additions and 9 deletions

View File

@@ -617,9 +617,7 @@ func TestSyncWithTrackRenames(t *testing.T) {
}()
haveHash := r.fremote.Hashes().Overlap(r.flocal.Hashes()).GetOne() != fs.HashNone
_, canMove := r.fremote.(fs.Mover)
_, canCopy := r.fremote.(fs.Copier)
canTrackRenames := haveHash && (canMove || canCopy)
canTrackRenames := haveHash && fs.CanServerSideMove(r.fremote)
t.Logf("Can track renames: %v", canTrackRenames)
f1 := r.WriteFile("potato", "Potato Content", t1)