mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
don't bother with an integrity check if the deck is unchanged
This commit is contained in:
parent
715c82aba9
commit
ae690ccea3
1 changed files with 3 additions and 3 deletions
|
@ -3340,9 +3340,6 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
|
||||||
"""Path must not be unicode."""
|
"""Path must not be unicode."""
|
||||||
if not numBackups:
|
if not numBackups:
|
||||||
return
|
return
|
||||||
# check integrity
|
|
||||||
if not deck.s.scalar("pragma integrity_check") == "ok":
|
|
||||||
raise DeckAccessError(_("Deck is corrupt."), type="corrupt")
|
|
||||||
def escape(path):
|
def escape(path):
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
path = path.replace("\\", "!")
|
path = path.replace("\\", "!")
|
||||||
|
@ -3364,6 +3361,9 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
|
||||||
if int(deck.modified) == int(
|
if int(deck.modified) == int(
|
||||||
os.stat(latest)[stat.ST_MTIME]):
|
os.stat(latest)[stat.ST_MTIME]):
|
||||||
return
|
return
|
||||||
|
# check integrity
|
||||||
|
if not deck.s.scalar("pragma integrity_check") == "ok":
|
||||||
|
raise DeckAccessError(_("Deck is corrupt."), type="corrupt")
|
||||||
# get next num
|
# get next num
|
||||||
if not backups:
|
if not backups:
|
||||||
n = 1
|
n = 1
|
||||||
|
|
Loading…
Reference in a new issue