From 8530d23a14a1425985875c439bc526eabcee05a7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Jun 2023 23:34:14 +0300 Subject: [PATCH] dbox: Don't set dbox file corrupted twice The file is set to be corrupted immediately when dbox file reading detects corruption, which causes the code path to return 0. This can happen all over the place. --- src/lib-storage/index/dbox-common/dbox-mail.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib-storage/index/dbox-common/dbox-mail.c b/src/lib-storage/index/dbox-common/dbox-mail.c index 0e9696c302..088cfc6609 100644 --- a/src/lib-storage/index/dbox-common/dbox-mail.c +++ b/src/lib-storage/index/dbox-common/dbox-mail.c @@ -299,11 +299,6 @@ int dbox_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED, ret = get_mail_stream(mail, offset, &input); if (ret <= 0) { - if (ret < 0) - return -1; - dbox_file_set_corrupted(mail->open_file, - "uid=%u points to broken data at offset=" - "%"PRIuUOFF_T, _mail->uid, offset); i_stream_unref(&input); return -1; } -- 2.47.3