<<< Date Index >>>     <<< Thread Index >>>

Re: mutt_buffy_check() and st_size of a directory



Hi,

* YONETANI Tomokazu wrote:

mutt_buffy_check() has the following code fragment at the beginning
of `Incoming' loop (line 311 of buffy.c on tip):

   if (stat (tmp->path, &sb) != 0 || sb.st_size == 0 ||
       (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
   {
     /* if the mailbox still doesn't exist, set the newly created flag to
      * be ready for when it does. */
     tmp->newly_created = 1;
     tmp->magic = 0;
     tmp->size = 0;
     continue;
   }

can `sb.st_size == 0' part be changed to the following?
        (S_ISREG(sb.st_mode) && sb.st_size == 0) ||

Yes, I pushed that change with a reworded explanation. Thanks for tracking it down.

Regards, Rocco