mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
if lastSync = 0, make sure we force in the right direction
This commit is contained in:
parent
78a276afe7
commit
0543df9bea
1 changed files with 5 additions and 2 deletions
|
@ -187,13 +187,16 @@ sync was aborted. Please report this error.""")
|
||||||
self.deck = None
|
self.deck = None
|
||||||
try:
|
try:
|
||||||
self.deck = DeckStorage.Deck(path)
|
self.deck = DeckStorage.Deck(path)
|
||||||
if not self.deck.lastSync:
|
|
||||||
self.conflictResolution = "keepLocal"
|
|
||||||
client = SyncClient(self.deck)
|
client = SyncClient(self.deck)
|
||||||
client.setServer(proxy)
|
client.setServer(proxy)
|
||||||
# need to do anything?
|
# need to do anything?
|
||||||
start = time.time()
|
start = time.time()
|
||||||
if client.prepareSync(proxy.timediff):
|
if client.prepareSync(proxy.timediff):
|
||||||
|
if self.deck.lastSync <= 0:
|
||||||
|
if client.remoteTime > client.localTime:
|
||||||
|
self.conflictResolution = "keepRemote"
|
||||||
|
else:
|
||||||
|
self.conflictResolution = "keepLocal"
|
||||||
changes = True
|
changes = True
|
||||||
# summary
|
# summary
|
||||||
if not self.conflictResolution and not self.onlyMerge:
|
if not self.conflictResolution and not self.onlyMerge:
|
||||||
|
|
Loading…
Reference in a new issue