login
Header Space

 
 

[PATCH] Add support for Apple Mail's Maildir format to builtin-mailsplit.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Git Mailing List <git@...>
Date: Monday, November 5, 2007 - 8:57 am

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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Add support for Apple Mail's Maildir format to built..., Michael J. Cohen, (Mon Nov 5, 8:57 am)
speck-geostationary