Show
Ignore:
Timestamp:
2007-03-20 13:39:29 (21 months ago)
Author:
Miroslav Lichvar <mlichvar@…>
Branch:
default
Message:

Make BUFFY_SIZE a runtime switch ($check_mbox_size)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • commands.c

    r4889 r5011  
    4141#endif 
    4242 
    43 #ifdef BUFFY_SIZE 
    4443#include "buffy.h" 
    45 #endif 
    4644 
    4745#include <errno.h> 
     
    704702  CONTEXT ctx; 
    705703  struct stat st; 
    706 #ifdef BUFFY_SIZE 
    707704  BUFFY *tmp = NULL; 
    708 #else 
    709705  struct utimbuf ut; 
    710 #endif 
    711706 
    712707  *redraw = 0; 
     
    843838    if (need_buffy_cleanup) 
    844839    { 
    845 #ifdef BUFFY_SIZE 
    846       tmp = mutt_find_mailbox (buf); 
    847       if (tmp && !tmp->new) 
    848         mutt_update_mailbox (tmp); 
    849 #else 
    850       /* fix up the times so buffy won't get confused */ 
    851       if (st.st_mtime > st.st_atime) 
    852       { 
    853         ut.actime = st.st_atime; 
    854         ut.modtime = time (NULL); 
    855         utime (buf, &ut);  
     840      if (option(OPTCHECKMBOXSIZE)) 
     841      { 
     842        tmp = mutt_find_mailbox (buf); 
     843        if (tmp && !tmp->new) 
     844          mutt_update_mailbox (tmp); 
    856845      } 
    857846      else 
    858         utime (buf, NULL); 
    859 #endif 
     847      { 
     848        /* fix up the times so buffy won't get confused */ 
     849        if (st.st_mtime > st.st_atime) 
     850        { 
     851          ut.actime = st.st_atime; 
     852          ut.modtime = time (NULL); 
     853          utime (buf, &ut);  
     854        } 
     855        else 
     856          utime (buf, NULL); 
     857      } 
    860858    } 
    861859