X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mbox.c;fp=mbox.c;h=3832eee4756257e27024d0a5600087f10a547508;hp=1c1065792cdb82d3d7ab2a49b2e3b0a2cd5da102;hb=bd0ed9bc7c534be30b0140b341b4d8a390483dbd;hpb=3984877e812b0ba73b84539d231aeca3c2de6b9b diff --git a/mbox.c b/mbox.c index 1c10657..3832eee 100644 --- a/mbox.c +++ b/mbox.c @@ -490,7 +490,7 @@ static int mbox_check_mailbox (CONTEXT* ctx, int* index_hint, int lock) { * 0 success * -1 failure */ -static int _mbox_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), int *index_hint) +static int mbox_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), int *index_hint) { char tempfile[_POSIX_PATH_MAX]; char buf[32]; @@ -806,19 +806,6 @@ bail: /* Come here in case of disaster */ return rc; } -static int mbox_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) { -#ifdef BUFFY_SIZE - BUFFY* tmp = NULL; -#endif - int rc = _mbox_sync_mailbox (ctx, unused, index_hint); - -#ifdef BUFFY_SIZE - if ((tmp = buffy_find_mailbox (ctx->path)) && tmp->new == 0) - buffy_update_mailbox (tmp); -#endif - return (rc); -} - /* close a mailbox opened in write-mode */ int mbox_close_mailbox (CONTEXT * ctx) { @@ -1023,16 +1010,15 @@ int mbox_is_magic (const char* path, struct stat* st) { return (M_MBOX); } else if ((f = fopen (path, "r")) != NULL) { -#ifndef BUFFY_SIZE struct utimbuf times; -#endif + fgets (tmp, sizeof (tmp), f); if (m_strncmp("From ", tmp, 5) == 0) magic = M_MBOX; else if (m_strcmp(MMDF_SEP, tmp) == 0) magic = M_MMDF; safe_fclose (&f); -#ifndef BUFFY_SIZE + /* need to restore the times here, the file was not really accessed, * only the type was accessed. This is important, because detection * of "new mail" depends on those times set correctly. @@ -1040,7 +1026,6 @@ int mbox_is_magic (const char* path, struct stat* st) { times.actime = st->st_atime; times.modtime = st->st_mtime; utime (path, ×); -#endif } else { mutt_perror (path); return (-1); /* fopen failed */