mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
add integrity check back to fixIntegrity
This commit is contained in:
parent
fca4ef7c00
commit
7b53facc4c
1 changed files with 2 additions and 0 deletions
|
@ -585,6 +585,8 @@ where c.nid == f.id
|
|||
problems = []
|
||||
self.save()
|
||||
oldSize = os.stat(self.path)[stat.ST_SIZE]
|
||||
if self.db.scalar("pragma integrity_check") != "ok":
|
||||
return _("Collection is corrupt. Please see the manual.")
|
||||
# delete any notes with missing cards
|
||||
ids = self.db.list("""
|
||||
select id from notes where id not in (select distinct nid from cards)""")
|
||||
|
|
Loading…
Reference in a new issue