]> granicus.if.org Git - mutt/commitdiff
Only consider empty files non-existent for buffy's purpose.
authorYONETANI Tomokazu <qhwt+mutt@les.ath.cx>
Fri, 29 Aug 2008 08:23:28 +0000 (10:23 +0200)
committerYONETANI Tomokazu <qhwt+mutt@les.ath.cx>
Fri, 29 Aug 2008 08:23:28 +0000 (10:23 +0200)
According to SUS, the st_size member of struct stat is undefined
for directories. In case a system reports 0, the newly_created
flag will be set for a directory and the magic will be cleared.

If the folder type is cleared, mutt won't check the folder for
new mail and thus will ignore MH and Maildir type folders on
such a fs completely (e.g. the HAMMER fs on DragonFly BSD).

ChangeLog
buffy.c

index 66f1d06ba4f02be105a23ca5812eadac98b83684..2b971b6e82e18e5d9be00e16cfea7ec43d818cd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2008-08-28 11:19 -0700  Brendan Cully  <brendan@kublai.com>  (1d94905ad00b)
+
+       * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c:
+       The msgset changes seem buggy. Reverting pending further testing.
+
+2008-08-28 02:31 -0700  Brendan Cully  <brendan@kublai.com>  (e68f79fef249)
+
+       * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c:
+       Split long IMAP commands for the benefit of lazy servers (closes
+       #3000). Also touches lots of old, hairy code. Likely to wake
+       sleeping dogs.
+
+2008-08-26 23:09 -0700  Brendan Cully  <brendan@kublai.com>  (2731e5174c5a)
+
+       * ChangeLog, imap/util.c, mutt_sasl.c, mutt_ssl.c, mutt_ssl_gnutls.c:
+       Properly set the SASL external auth name when using SSL client
+       certs. Also zero out the account structure before filling it with
+       available data. Client certificates + SASL EXTERNAL were only
+       working by luck.
+
 2008-08-26 02:07 -0700  Brendan Cully  <brendan@kublai.com>  (22498996719f)
 
        * imap/imap.c: Remove leftover IMAP IDLE handling from before
diff --git a/buffy.c b/buffy.c
index 8a3f6fce19bde3ab208b9d9184c6dfa30e1a0d59..db20c218c57e9fb86f31686763e1584bd1b1f81f 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -308,7 +308,7 @@ int mutt_buffy_check (int force)
       tmp->magic = M_POP;
     else
 #endif
-    if (stat (tmp->path, &sb) != 0 || sb.st_size == 0 ||
+    if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && 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