mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!
This commit is contained in:
@@ -569,9 +569,9 @@ async fn import_backup_old(context: &Context, backup_to_import: impl AsRef<Path>
|
|||||||
/* re-open copied database file */
|
/* re-open copied database file */
|
||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.open(&context, &context.get_dbfile(), false)
|
.openh(&context, &context.get_dbfile(), false)
|
||||||
.await
|
.await
|
||||||
.context("Could not re-open db")?;
|
.context("that's just the context")?;
|
||||||
|
|
||||||
delete_and_reset_all_device_msgs(&context).await?;
|
delete_and_reset_all_device_msgs(&context).await?;
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,15 @@ impl Sql {
|
|||||||
res.map_err(|e| format_err!("Could not open db: {}", e))
|
res.map_err(|e| format_err!("Could not open db: {}", e))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn openh<T: AsRef<Path>>(
|
||||||
|
&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<S: AsRef<str>>(
|
pub async fn execute<S: AsRef<str>>(
|
||||||
&self,
|
&self,
|
||||||
sql: S,
|
sql: S,
|
||||||
|
|||||||
Reference in New Issue
Block a user