read error from correct db handle on backup init failure

Per SQLite docs, sqlite3_backup_init stores errors on the destination database handle.

In backup mode the destination is remoteConn.db; in restore mode it is c.db. Previously errcode was always read from remoteConn.db (wrong for restore) and errmsg was always read from c.db via c.errstr (wrong for backup). Read both from the actual destination handle.

Merge request reports

Loading