diff options
Diffstat (limited to 'mail/mutt/files/extra-patch-maildir-mtime')
-rw-r--r-- | mail/mutt/files/extra-patch-maildir-mtime | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mail/mutt/files/extra-patch-maildir-mtime b/mail/mutt/files/extra-patch-maildir-mtime new file mode 100644 index 000000000000..b5c27bc30861 --- /dev/null +++ b/mail/mutt/files/extra-patch-maildir-mtime @@ -0,0 +1,52 @@ +--- PATCHES Dec 2002 17:44:54 -0000 3.6 ++++ PATCHES Feb 2004 13:19:42 -0000 +@@ -0,0 +1 @@ ++patch-1.5.7.ust.maildir-mtime.2 +--- browser.c.orig Wed Jan 26 13:41:04 2005 ++++ browser.c Wed Feb 9 09:20:14 2005 +@@ -27,6 +27,7 @@ + #ifdef USE_IMAP + #include "imap.h" + #endif ++#include "mx.h" + + #include <stdlib.h> + #include <dirent.h> +@@ -346,6 +347,21 @@ + menu->data = state->entry; + } + ++static void check_maildir_times (BUFFY *buf, struct stat *st) ++{ ++ char buffer[_POSIX_PATH_MAX + SHORT_STRING]; ++ struct stat s; ++ ++ if(!buf || buf->magic != M_MAILDIR) ++ return; ++ ++ snprintf (buffer, sizeof (buffer), "%s/tmp", buf->path); ++ if (lstat (buffer, &s) != 0) ++ return; ++ ++ st->st_mtime = s.st_mtime; ++} ++ + static int examine_directory (MUTTMENU *menu, struct browser_state *state, + char *d, const char *prefix) + { +@@ -409,6 +425,7 @@ + tmp = Incoming; + while (tmp && mutt_strcmp (buffer, tmp->path)) + tmp = tmp->next; ++ check_maildir_times (tmp, &s); + add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0); + } + closedir (dp); +@@ -454,6 +471,7 @@ + strfcpy (buffer, NONULL(tmp->path), sizeof (buffer)); + mutt_pretty_mailbox (buffer); + ++ check_maildir_times (tmp, &s); + add_folder (menu, state, buffer, &s, tmp->new); + } + while ((tmp = tmp->next)); |