Git development
 help / color / mirror / Atom feed
From: "Michael J. Cohen" <michaeljosephcohen@mac.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] Add support for Apple Mail's Maildir format to builtin-mailsplit.
Date: Mon, 5 Nov 2007 07:57:15 -0500	[thread overview]
Message-ID: <B702E75B-6002-440E-91B5-0E52E16BCCF0@mac.com> (raw)

  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

                 reply	other threads:[~2007-11-05 12:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B702E75B-6002-440E-91B5-0E52E16BCCF0@mac.com \
    --to=michaeljosephcohen@mac.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox