Re: [notmuch] [PATCH] notmuch-new: Test if directory looks like Maildir before skippi...
authorCarl Worth <cworth@cworth.org>
Sat, 28 Nov 2009 03:41:36 +0000 (19:41 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:45 +0000 (09:35 -0800)
22/cfe407f7ffd78088db79c7335f744aee3a6cbb [new file with mode: 0644]

diff --git a/22/cfe407f7ffd78088db79c7335f744aee3a6cbb b/22/cfe407f7ffd78088db79c7335f744aee3a6cbb
new file mode 100644 (file)
index 0000000..bcbe404
--- /dev/null
@@ -0,0 +1,61 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C097B431FC0;\r
+       Fri, 27 Nov 2009 19:41:51 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 5jfg2do4YyYS; Fri, 27 Nov 2009 19:41:51 -0800 (PST)\r
+Received: from cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B9E0F431FAE;\r
+       Fri, 27 Nov 2009 19:41:50 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Jan Janak <jan@ryngle.com>, notmuch@notmuchmail.org\r
+In-Reply-To: <1259183505-30840-1-git-send-email-jan@ryngle.com>\r
+References: <1259178195-30324-1-git-send-email-jan@ryngle.com>\r
+       <1259183505-30840-1-git-send-email-jan@ryngle.com>\r
+Date: Fri, 27 Nov 2009 19:41:36 -0800\r
+Message-ID: <87vdgvjoy7.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: Re: [notmuch] [PATCH] notmuch-new: Test if directory looks like\r
+ Maildir before skipping tmp.\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 28 Nov 2009 03:41:51 -0000\r
+\r
+On Wed, 25 Nov 2009 22:11:45 +0100, Jan Janak <jan@ryngle.com> wrote:\r
+> Files and subdirectories with the name "tmp" that do not look like\r
+> Maildir will still be processed by 'notmuch new'.\r
+\r
+This is a nice improvement. I realize we neglected to document the\r
+original "tmp" skipping. This should definitely be safer, (though we\r
+should document this as well).\r
+\r
+And this maildir detection will also be useful for the outstanding patch\r
+to add tags based on flags in maildir filenames.\r
+\r
+I pushed the patch and then made two, minor whitespace fixes:\r
+\r
+> +static int is_maildir (struct dirent **entries, int count)\r
+\r
+The function name in the definition here belongs on its own line.\r
+\r
+> +        if (found == 3) return 1;\r
+\r
+Having the action of the "if" statement on the same line as the "if"\r
+itself hides it too much. That also belongs on the next line.\r
+\r
+-Carl\r