From 060fbb788ef77484895065353866a25b4a516aa3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 7 Dec 2010 10:40:23 +0900 Subject: [PATCH] tell server to save after response received & applied --- ankiqt/ui/sync.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/sync.py b/ankiqt/ui/sync.py index 2d25af6b2..b007dc91e 100755 --- a/ankiqt/ui/sync.py +++ b/ankiqt/ui/sync.py @@ -234,11 +234,12 @@ sync was aborted. Please report this error.""") # apply reply self.setStatus(_("Applying reply..."), 0) client.applyPayloadReply(res) - # finished. save deck, preserving mod time - self.setStatus(_("Sync complete.")) + # now that both sides have successfully applied, tell + # server to save, then save local + client.server.finish() self.deck.lastLoaded = self.deck.modified - self.deck.s.flush() self.deck.s.commit() + self.setStatus(_("Sync complete.")) else: changes = False if not deck: