forked from mirror/go-sqlcipher
Backup.Step may handle SQLITE_BUSY / SQLITE_LOCKED specifically. Close #133
This commit is contained in:
parent
acf1dd667b
commit
817f281a0d
|
@ -41,7 +41,7 @@ func (b *SQLiteBackup) Step(p int) (bool, error) {
|
||||||
ret := C.sqlite3_backup_step(b.b, C.int(p))
|
ret := C.sqlite3_backup_step(b.b, C.int(p))
|
||||||
if ret == C.SQLITE_DONE {
|
if ret == C.SQLITE_DONE {
|
||||||
return true, nil
|
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, Error{Code: ErrNo(ret)}
|
||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
|
|
Loading…
Reference in New Issue