From: Marco Bettini Date: Fri, 3 Mar 2023 16:15:17 +0000 (+0000) Subject: lib-storage: dbox_cleanup_temp_files() - Fix inverted check for ENOENT X-Git-Tag: 2.4.0~2941 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8822f061e728eb6f18f025f61659922521907e93;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: dbox_cleanup_temp_files() - Fix inverted check for ENOENT --- diff --git a/src/lib-storage/index/dbox-common/dbox-storage.c b/src/lib-storage/index/dbox-common/dbox-storage.c index a24442f5dd..b3d61d77d9 100644 --- a/src/lib-storage/index/dbox-common/dbox-storage.c +++ b/src/lib-storage/index/dbox-common/dbox-storage.c @@ -177,7 +177,6 @@ static bool dbox_cleanup_temp_files(struct mailbox *box, const char *path, time_t last_scan_time, time_t last_change_time) { - struct event *event = box->event; unsigned int interval = box->list->mail_set->mail_temp_scan_interval; /* check once in a while if there are temp files to clean up */ @@ -194,8 +193,9 @@ dbox_cleanup_temp_files(struct mailbox *box, const char *path, struct stat st; if (stat(path, &st) < 0) { - if (errno == ENOENT) - e_error(event, "stat(%s) failed: %m", path); + if (errno != ENOENT) + e_error(box->event, + "stat(%s) failed: %m", path); return FALSE; } last_change_time = st.st_ctime;