1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00
freebsd-ports/mail/mutt/files/extra-patch-maildir-mtime-nntp
Adam Weinberger 9d95d69a95 Update VVV patch to support 1.9.0, and unbreak the NNTP option.
PR:		222244
Submitted by:	maintainer (dereks lifeofadishwasher com)
2017-09-12 02:29:53 +00:00

53 lines
1.4 KiB
Plaintext

--- PATCHES.orig 2017-09-10 21:57:09 UTC
+++ PATCHES
@@ -0,0 +1 @@
+patch-1.5.7.ust.maildir-mtime.2
--- browser.c.orig 2017-09-10 21:56:59 UTC
+++ browser.c
@@ -35,6 +35,7 @@
#ifdef USE_NNTP
#include "nntp.h"
#endif
+#include "mx.h"
#include <stdlib.h>
#include <dirent.h>
@@ -545,6 +546,21 @@ static void init_state (struct browser_s
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 != MUTT_MAILDIR)
+ return;
+
+ snprintf (buffer, sizeof (buffer), "%s/tmp", buf->path);
+ if (lstat (buffer, &s) != 0)
+ return;
+
+ st->st_mtime = s.st_mtime;
+}
+
/* get list of all files/newsgroups with mask */
static int examine_directory (MUTTMENU *menu, struct browser_state *state,
char *d, const char *prefix)
@@ -634,6 +650,7 @@ static int examine_directory (MUTTMENU *
tmp = Incoming;
while (tmp && mutt_strcmp (buffer, tmp->path))
tmp = tmp->next;
+ check_maildir_times (tmp, &s);
if (tmp && Context &&
!mutt_strcmp (tmp->realpath, Context->realpath))
{
@@ -737,6 +754,7 @@ static int examine_mailboxes (MUTTMENU *
s.st_mtime = st2.st_mtime;
}
+ check_maildir_times (tmp, &s);
add_folder (menu, state, buffer, &s, tmp, NULL);
}
while ((tmp = tmp->next));