fix: do not configure folders during transport configuration

We do not have transport ID assigned until configuration finishes,
so we cannot save UID validitiy for folders and write
into any tables that have transport_id column yet.
This commit is contained in:
link2xt
2025-11-28 19:24:48 +00:00
committed by l
parent 721b9cebef
commit 7e4547582e

View File

@@ -538,12 +538,11 @@ async fn configure(ctx: &Context, param: &EnteredLoginParam) -> Result<Option<&'
let (_s, r) = async_channel::bounded(1);
let mut imap = Imap::new(ctx, transport_id, configured_param.clone(), r).await?;
let configuring = true;
let mut imap_session = match imap.connect(ctx, configuring).await {
Ok(session) => session,
Err(err) => bail!(
if let Err(err) = imap.connect(ctx, configuring).await {
bail!(
"{}",
nicer_configuration_error(ctx, format!("{err:#}")).await
),
);
};
progress!(ctx, 850);
@@ -558,10 +557,6 @@ async fn configure(ctx: &Context, param: &EnteredLoginParam) -> Result<Option<&'
ctx.sql.set_raw_config("only_fetch_mvbox", None).await?;
}
let create_mvbox = false;
imap.configure_folders(ctx, &mut imap_session, create_mvbox)
.await?;
drop(imap);
progress!(ctx, 910);