Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 61 / c3cf79bb9c2df476269d4687aabbb872235cc7
1 Return-Path: <too@guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 39D8A429E37\r
6         for <notmuch@notmuchmail.org>; Wed, 13 Nov 2013 09:03:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id HzBv2vdlEpDS for <notmuch@notmuchmail.org>;\r
16         Wed, 13 Nov 2013 09:03:03 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 120EF431FD2\r
19         for <notmuch@notmuchmail.org>; Wed, 13 Nov 2013 09:02:57 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id C19441000F2; Wed, 13 Nov 2013 19:02:52 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v2 4/5] compact: unconditionally attempt to remove old wip\r
25         database compact directory\r
26 Date: Wed, 13 Nov 2013 19:02:46 +0200\r
27 Message-Id: <1384362167-12740-5-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.8.0\r
29 In-Reply-To: <1384362167-12740-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <1384362167-12740-1-git-send-email-tomi.ollila@iki.fi>\r
31 Cc: tomi.ollila@iki.fi\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Wed, 13 Nov 2013 17:03:09 -0000\r
45 \r
46 In case previous notmuch compact has been interrupted there is old\r
47 work-in-progress database compact directory partially filled. Remove\r
48 it just before starting to fill the directory with new files.\r
49 ---\r
50  lib/database.cc | 5 +++++\r
51  1 file changed, 5 insertions(+)\r
52 \r
53 diff --git a/lib/database.cc b/lib/database.cc\r
54 index ee09c5e..4b5ac64 100644\r
55 --- a/lib/database.cc\r
56 +++ b/lib/database.cc\r
57 @@ -920,6 +920,11 @@ notmuch_database_compact (const char *path,\r
58         goto DONE;\r
59      }\r
60  \r
61 +    // Unconditionally attempt to remove old work-in-progress database (if any).\r
62 +    // This is "protected" by database lock. If this fails due to write errors\r
63 +    // (etc), the following code will fail and provide error message.\r
64 +    (void) rmtree (compact_xapian_path);\r
65 +\r
66      try {\r
67         NotmuchCompactor compactor (status_cb, closure);\r
68  \r
69 -- \r
70 1.8.3.1\r
71 \r