mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Fix deletion check
This commit is contained in:
parent
c9bf97f31c
commit
fdbd3d0982
2 changed files with 5 additions and 0 deletions
|
@ -732,6 +732,9 @@ func (ot *objectTree) ChangesAfterCommonSnapshot(theirPath, theirHeads []string)
|
|||
}
|
||||
|
||||
func (ot *objectTree) ChangesAfterCommonSnapshotLoader(theirPath, theirHeads []string) (LoadIterator, error) {
|
||||
if ot.isDeleted {
|
||||
return nil, ErrDeleted
|
||||
}
|
||||
var (
|
||||
needFullDocument = len(theirPath) == 0
|
||||
ourPath = ot.SnapshotPath()
|
||||
|
|
|
@ -246,6 +246,8 @@ func TestObjectTree(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
_, err = aTree.ChangesAfterCommonSnapshot(nil, nil)
|
||||
require.Equal(t, ErrDeleted, err)
|
||||
_, err = aTree.ChangesAfterCommonSnapshotLoader(nil, nil)
|
||||
require.Equal(t, ErrDeleted, err)
|
||||
err = aTree.IterateFrom("", nil, func(change *Change) bool {
|
||||
return true
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue