Skip to content

Commit 2f29c56

Browse files
link2xtr10s
authored andcommitted
fix: do not log error if watched folder is not configured
This may happen if Sent folder does not exist but configuration option to watch it is enabled.
1 parent de86b8a commit 2f29c56

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

python/tests/test_1_online.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def test_webxdc_download_on_demand(acfactory, data, lp):
381381
assert msgs_changed_event.data1 == msg2.chat.id
382382
assert msgs_changed_event.data2 == 0
383383

384-
@pytest.mark.xfail(reason="Test server has no sentbox folder")
384+
385385
def test_mvbox_sentbox_threads(acfactory, lp):
386386
lp.sec("ac1: start with mvbox thread")
387387
ac1 = acfactory.new_online_configuring_account(mvbox_move=True, sentbox_watch=True)

src/scheduler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,10 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder_meaning: Folder
520520
let (folder_config, watch_folder) = match convert_folder_meaning(ctx, folder_meaning).await {
521521
Ok(meaning) => meaning,
522522
Err(error) => {
523-
error!(ctx, "Error converting IMAP Folder name: {:?}", error);
523+
// Warning instead of error because the folder may not be configured.
524+
// For example, this happens if the server does not have Sent folder
525+
// but watching Sent folder is enabled.
526+
warn!(ctx, "Error converting IMAP Folder name: {:?}", error);
524527
connection.connectivity.set_not_configured(ctx).await;
525528
connection
526529
.fake_idle(ctx, None, FolderMeaning::Unknown)

0 commit comments

Comments
 (0)