From 7b53facc4c1e058eb49ceb63cc93fde5b2afeb37 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 18 Dec 2011 12:32:44 +0900 Subject: [PATCH] add integrity check back to fixIntegrity --- anki/collection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/collection.py b/anki/collection.py index 6717f0dca..6c1857a88 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -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)""")