~ubuntu-branches/ubuntu/precise/mutt/precise

« back to all changes in this revision

Viewing changes to debian/patches/mutt-patched/sidebar-compat-apply.debian

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-06-27 23:52:24 UTC
  • mfrom: (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090627235224-z52j0hm6cpknxrk1
Tags: 1.5.20-2ubuntu1
Merge from debian unstable (LP: #392997), remaining changes:
debian/control: Recommend default-mta instead of exim4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim:ft=diff:
2
 
[continued from sidebar-compat-revert]
3
 
 
4
 
After having applied the sidebar patch, we now re-apply the relevant part of
5
 
the maildir-mtime patch. The hunk is considerably shorter as we are always
6
 
counting messages; the if..break part has been dropped.
7
 
--- a/buffy.c
8
 
+++ b/buffy.c
9
 
@@ -445,6 +445,11 @@
10
 
            tmp->has_new = tmp->new = 1;
11
 
             tmp->msgcount++;
12
 
             tmp->msg_unread++;
13
 
+           snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name);
14
 
+           if (!stat (path, &smd) && smd.st_mtime > tmp->mtime)
15
 
+           {
16
 
+             tmp->mtime = smd.st_mtime;
17
 
+           }
18
 
          }
19
 
        }
20
 
         if(tmp->msg_unread)
21
 
--- a/buffy.h
22
 
+++ b/buffy.h
23
 
@@ -26,6 +26,7 @@
24
 
   off_t size;
25
 
   struct buffy_t *next;
26
 
   struct buffy_t *prev;
27
 
+  time_t mtime;                        /* for maildirs...time of newest entry */
28
 
   short new;                   /* mailbox has new mail */
29
 
   short has_new;               /* set it new if new and not read */
30
 
   int msgcount;                        /* total number of messages */