diff --git a/src/imex.rs b/src/imex.rs index 60ec4740d..bc0423632 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -569,9 +569,9 @@ async fn import_backup_old(context: &Context, backup_to_import: impl AsRef /* re-open copied database file */ context .sql - .open(&context, &context.get_dbfile(), false) + .openh(&context, &context.get_dbfile(), false) .await - .context("Could not re-open db")?; + .context("that's just the context")?; delete_and_reset_all_device_msgs(&context).await?; diff --git a/src/sql.rs b/src/sql.rs index 137155125..451b6de8a 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -96,6 +96,15 @@ impl Sql { res.map_err(|e| format_err!("Could not open db: {}", e)) } + pub async fn openh>( + &self, + context: &Context, + dbfile: T, + readonly: bool, + ) -> crate::error::Result<()> { + Err(format_err!("This is the actual error the user should see")) + } + pub async fn execute>( &self, sql: S,