Add support for Apple Mail's Maildir format to builtin-mailsplit.
Currently, mailsplit only checks for the directory 'cur' inside of the
specified directory, whereas Apple Mail's Maildirs have a Messages
directory.
Signed-off-by: Michael Cohen <mjc@kernel.org>
---
Another patch will follow to allow builtin-mailinfo to parse Apple
Mail's extra header and footers.
builtin-mailsplit.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/builtin-mailsplit.c b/builtin-mailsplit.c
index 74b0470..6256351 100644
--- a/builtin-mailsplit.c
+++ b/builtin-mailsplit.c
@@ -129,8 +129,11 @@ static int split_maildir(const char *maildir,
const char *dir,
struct path_list list = {NULL, 0, 0, 1};
snprintf(curdir, sizeof(curdir), "%s/cur", maildir);
- if (populate_maildir_list(&list, curdir) < 0)
- goto out;
+ if (populate_maildir_list(&list, curdir) < 0) {
+ snprintf(curdir, sizeof(curdir), "%s/Messages", maildir);
+ if (populate_maildir_list(&list, curdir) < 0)
+ goto out;
+ }
for (i = 0; i < list.nr; i++) {
FILE *f;
--
1.5.3.5.562.g45f4-dirty
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc5 |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Tomasz Kłoczko | Is it time for remove (crap) ALSA from kernel tree ? |
| Linus Torvalds | Linux v2.6.27-rc1 |
git: | |
| Pierre Habouzit | git push (mis ?)behavior |
| Linus Torvalds | Re: Something is broken in repack |
| Michael J Gruber | gitignore: negating path patterns |
| Steven Grimm | StGIT vs. guilt: What's the difference? |
| Markus Wernig | host to host ipsec link |
| Richard Stallman | Re: Real men don't attack straw men |
| Kevin Neff | Patching a SSH 'Weakness' |
| Jeffrey 'jf' Lim | "VIA Announces Strategic Open Source Driver Development Initiative" |
| Denys Fedoryshchenko | panic 2.6.27-rc3-git2, qdisc_dequeue_head |
| Evgeniy Polyakov | [resend take 2 4/4] DST Makefile/Kconfig files. |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Arkadiusz Miskiewicz | htb and UDP packages bigger than 1500 |
| USB statistics | 44 minutes ago | Linux kernel |
| Block Sub System query | 4 hours ago | Linux kernel |
| kernel module to intercept socket creation | 5 hours ago | Linux kernel |
| Image size changing during each build | 6 hours ago | Linux kernel |
| Soft lock bug | 11 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 17 hours ago | Linux kernel |
| Question on swap as ramdisk partition | 19 hours ago | Linux kernel |
| serial driver xmit problem | 1 day ago | Linux kernel |
| Generic Netlink subsytem | 1 day ago | Linux kernel |
| 'Report spam filter error' page broken | 1 day ago | KernelTrap Suggestions and Feedback |
