mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't alter lastSync on upgrade
This commit is contained in:
parent
a334f839b8
commit
3f5befc2e7
1 changed files with 8 additions and 6 deletions
10
anki/deck.py
10
anki/deck.py
|
@ -3144,13 +3144,15 @@ Return new path, relative to media dir."""
|
|||
# toggling does not bump deck mod time, since it may happen on upgrade,
|
||||
# and the variable is not synced
|
||||
|
||||
def enableSyncing(self):
|
||||
def enableSyncing(self, ls=True):
|
||||
self.syncName = unicode(checksum(self.path.encode("utf-8")))
|
||||
if ls:
|
||||
self.lastSync = 0
|
||||
self.s.commit()
|
||||
|
||||
def disableSyncing(self):
|
||||
def disableSyncing(self, ls=True):
|
||||
self.syncName = None
|
||||
if ls:
|
||||
self.lastSync = 0
|
||||
self.s.commit()
|
||||
|
||||
|
@ -4296,9 +4298,9 @@ syncing again via Settings>Deck Properties>Synchronsiation.
|
|||
If you have syncing disabled in the preferences, you can ignore \
|
||||
this message. (ERR-0101)""") % {
|
||||
'sname':sname, 'dname':dname})
|
||||
deck.disableSyncing()
|
||||
deck.disableSyncing(ls=False)
|
||||
elif sname:
|
||||
deck.enableSyncing()
|
||||
deck.enableSyncing(ls=False)
|
||||
deck.version = 52
|
||||
deck.s.commit()
|
||||
if deck.version < 53:
|
||||
|
|
Loading…
Reference in a new issue