Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E39FE431FD0 for ; Tue, 23 Aug 2011 17:12:01 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.363 X-Spam-Level: * X-Spam-Status: No, score=1.363 tagged_above=-999 required=5 tests=[RDNS_DYNAMIC=0.363, TO_NO_BRKTS_DYNIP=1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uvGgABh5Q0tL for ; Tue, 23 Aug 2011 17:12:01 -0700 (PDT) Received: from hackervisions.org (67-207-143-141.slicehost.net [67.207.143.141]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8E2B5431FB6 for ; Tue, 23 Aug 2011 17:12:01 -0700 (PDT) Received: from ool-4572d87b.dyn.optonline.net ([69.114.216.123] helo=localhost) by hackervisions.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Qw15s-0000lO-9c for notmuch@notmuchmail.org; Tue, 23 Aug 2011 20:13:20 -0400 From: James Vasile To: notmuch@notmuchmail.org Subject: [PATCH] Skip dot files in `notmuch new` User-Agent: Notmuch/0.7-35-g138289f (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Tue, 23 Aug 2011 20:11:53 -0400 Message-ID: <8762lnwtva.fsf@hackervisions.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 00:12:02 -0000 No known mail client or fetch tool stores mail in dot files, because files that start with '.' are usually used to store metadata (i.e. state or configuration) as opposed to subject-matter data. Some mail fetch tools (including mbsync) and clients use dot files in maildirs to store metadata. Notmuch should not warn that it is ignoring these files, since it *should* ignore them. Indeed, it should ignore all dot files. --- notmuch-new.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 7d17793..87ee07e 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -428,6 +428,10 @@ add_files_recursive (notmuch_database_t *notmuch, continue; } + /* Don't add dot files. */ + if (entry->d_name[0] == '.') + continue; + /* We're now looking at a regular file that doesn't yet exist * in the database, so add it. */ next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name); -- 1.7.5.4