# HG changeset patch # User Timo Sirainen # Date 1188231216 -10800 # Node ID 29d2499822822c6228e95755d7d14f828e0aad5a # Parent b8b02d1555994f35abb186471dc538c932347387 Error handling fixes. diff -r b8b02d155599 -r 29d249982282 src/lib-storage/index/maildir/maildir-sync.c --- a/src/lib-storage/index/maildir/maildir-sync.c Mon Aug 27 19:12:59 2007 +0300 +++ b/src/lib-storage/index/maildir/maildir-sync.c Mon Aug 27 19:13:36 2007 +0300 @@ -564,7 +564,8 @@ bool refreshed = FALSE, check_new = FALSE, check_cur = FALSE; if (mbox->maildir_hdr.new_mtime == 0) { - maildir_header_refresh(mbox); + if (maildir_header_refresh(mbox) < 0) + return -1; if (mbox->maildir_hdr.new_mtime == 0) { /* first sync */ *new_changed_r = *cur_changed_r = TRUE; @@ -578,7 +579,8 @@ if (DIR_DELAYED_REFRESH(hdr, new) || DIR_DELAYED_REFRESH(hdr, cur)) { /* refresh index and try again */ - maildir_header_refresh(mbox); + if (maildir_header_refresh(mbox) < 0) + return -1; refreshed = TRUE; if (DIR_DELAYED_REFRESH(hdr, new)) @@ -610,7 +612,8 @@ break; /* refresh index and try again */ - maildir_header_refresh(mbox); + if (maildir_header_refresh(mbox) < 0) + return -1; refreshed = TRUE; }