if lastSync = 0, make sure we force in the right direction

This commit is contained in:
Damien Elmes 2011-01-13 05:23:41 +09:00
parent 78a276afe7
commit 0543df9bea

View file

@ -187,13 +187,16 @@ sync was aborted. Please report this error.""")
self.deck = None
try:
self.deck = DeckStorage.Deck(path)
if not self.deck.lastSync:
self.conflictResolution = "keepLocal"
client = SyncClient(self.deck)
client.setServer(proxy)
# need to do anything?
start = time.time()
if client.prepareSync(proxy.timediff):
if self.deck.lastSync <= 0:
if client.remoteTime > client.localTime:
self.conflictResolution = "keepRemote"
else:
self.conflictResolution = "keepLocal"
changes = True
# summary
if not self.conflictResolution and not self.onlyMerge: