mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
test db integrity before upload
This commit is contained in:
parent
0ef3fe5d75
commit
08660f6bf8
1 changed files with 3 additions and 0 deletions
|
@ -532,6 +532,9 @@ class FullSyncer(HttpSyncer):
|
|||
|
||||
def upload(self):
|
||||
runHook("sync", "upload")
|
||||
# make sure it's ok before we try to upload
|
||||
assert self.col.db.scalar("pragma integrity_check") == "ok"
|
||||
# apply some adjustments, then upload
|
||||
self.col.beforeUpload()
|
||||
assert self.req("upload", open(self.col.path, "rb")) == "OK"
|
||||
|
||||
|
|
Loading…
Reference in a new issue