mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

when building message cache dirs, mkdir new and tmp

makes cache dirs get recognized as Maildirs to enable reading them
as offline backups

+23
+23
bcache.c
··· 25 25 #include <errno.h> 26 26 #include <dirent.h> 27 27 #include <stdio.h> 28 + #include <libgen.h> 28 29 29 30 #include "mutt.h" 30 31 #include "account.h" ··· 67 68 mutt_buffer_printf (dst, "%s/%s%s", MessageCachedir, host, mutt_b2s (path)); 68 69 if (*(dst->dptr - 1) != '/') 69 70 mutt_buffer_addch (dst, '/'); 71 + mutt_buffer_addstr (dst, "cur/", 4); 70 72 71 73 dprint (3, (debugfile, "bcache_path: path: '%s'\n", mutt_b2s (dst))); 72 74 bcache->path = safe_strdup (mutt_b2s (dst)); ··· 126 128 FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp) 127 129 { 128 130 BUFFER *path = NULL; 131 + BUFFER *newpath = NULL; 129 132 FILE* fp = NULL; 130 133 char* s = NULL; 131 134 struct stat sb; ··· 156 159 *s = '/'; 157 160 s = strchr (s + 1, '/'); 158 161 } 162 + 163 + /* make sure new and tmp dirs exist in parent to be like real maildirs */ 164 + if ((s = dirname(path))) { 165 + s = dirname(s); 166 + 167 + newpath = mutt_buffer_pool_get (); 168 + mutt_buffer_printf (newpath, "%s/new", s); 169 + 170 + if (stat (mutt_b2s (newpath), &sb) < 0 && 171 + (errno != ENOENT || mkdir (mutt_b2s (newpath), 0777) < 0)) 172 + return NULL; 173 + 174 + mutt_buffer_printf (newpath, "%s/tmp", s); 175 + if (stat (mutt_b2s (newpath), &sb) < 0 && 176 + (errno != ENOENT || mkdir (mutt_b2s (newpath), 0777) < 0)) 177 + return NULL; 178 + 179 + mutt_buffer_pool_release (&newpath); 180 + } else 181 + return NULL; 159 182 160 183 out: 161 184 dprint (3, (debugfile, "bcache: put: '%s'\n", mutt_b2s (path)));