X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=mx.c;h=28eb914ccdd7feeb07fe8b0c1bc9e2ee80d1f354;hb=5f6b586de5a46f2359a4fc392fd89f1716d847a3;hp=4bbbaf1203c8cefc5cb9f66aebd3680ea9bee27d;hpb=546433d312df43754962a34eac05fee84d73a455;p=apps%2Fmadmutt.git diff --git a/mx.c b/mx.c index 4bbbaf1..28eb914 100644 --- a/mx.c +++ b/mx.c @@ -487,7 +487,7 @@ static int mx_open_mailbox_append (CONTEXT * ctx, int flags) } return (-1); } - fseek (ctx->fp, 0, 2); + fseeko (ctx->fp, 0, 2); break; case M_MH: @@ -1439,7 +1439,7 @@ int mx_rebuild_cache (void) { mutt_error (_("Support for header caching was not build in.")); return (1); #else - int i = 0, magic = 0, imap = 0; + int i = 0, magic = 0; CONTEXT* ctx = NULL; char* buf = NULL; BUFFY* b = NULL; @@ -1454,10 +1454,12 @@ int mx_rebuild_cache (void) { for (i = 0; i < Incoming->length; i++) { b = (BUFFY*) Incoming->data[i]; magic = mx_get_magic (b->path); - if (magic != M_MAILDIR && magic != M_MH && magic != M_IMAP) + if (magic != M_MAILDIR && magic != M_MH +#ifdef USE_IMAP + && magic != M_IMAP +#endif + ) continue; - if (magic == M_IMAP) - imap = 1; buf = str_dup (b->path); mutt_pretty_mailbox (buf); mutt_message (_("Rebuilding cache for %s..."), buf); @@ -1468,9 +1470,6 @@ int mx_rebuild_cache (void) { mem_free (&buf); } - if (imap) - imap_logout_all (); - mutt_clear_error (); return (0);