replication/diff: replace invalid comparison of CreateTXG with Creation

This commit is contained in:
Christian Schwarz 2018-09-04 13:32:19 -07:00
parent 4336af295f
commit be57d6ce8e

View File

@ -65,7 +65,16 @@ func IncrementalPath(receiver, sender []*FilesystemVersion) (incPath []*Filesyst
} }
break break
} }
if receiver[mrcaRcv].CreateTXG < sender[mrcaSnd].CreateTXG { receiverCreation, err := receiver[mrcaRcv].CreationAsTime()
if err != nil {
panic(err) // FIXME move this to a sorting phase before
}
senderCreation, err := sender[mrcaSnd].CreationAsTime()
if err != nil {
panic(err) // FIXME move this to the sorting phase before
}
if receiverCreation.Before(senderCreation) {
mrcaSnd-- mrcaSnd--
} else { } else {
mrcaRcv-- mrcaRcv--