Backup.Step may handle SQLITE_BUSY / SQLITE_LOCKED specifically. Close #133

systemlib
mattn 2014-11-14 19:37:23 +09:00
parent acf1dd667b
commit 817f281a0d
1 changed files with 1 additions and 1 deletions

View File

@ -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