From 817f281a0d5126bb8cb4a8bbae064967b31164d0 Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 14 Nov 2014 19:37:23 +0900 Subject: [PATCH] Backup.Step may handle SQLITE_BUSY / SQLITE_LOCKED specifically. Close #133 --- backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.go b/backup.go index 9345209..270446a 100644 --- a/backup.go +++ b/backup.go @@ -41,7 +41,7 @@ func (b *SQLiteBackup) Step(p int) (bool, error) { ret := C.sqlite3_backup_step(b.b, C.int(p)) if ret == C.SQLITE_DONE { return true, nil - } else if ret != 0 { + } else if ret != 0 && ret != C.SQLITE_LOCKED && ret != C.SQLITE_BUSY { return false, Error{Code: ErrNo(ret)} } return false, nil