Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d9 / 0a3f655f2beecaabdfee90738051964519403d
1 Return-Path: <sojkam1@fel.cvut.cz>\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 2E8B54196F2\r
6         for <notmuch@notmuchmail.org>; Fri, 26 Mar 2010 14:18:25 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=unavailable\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 wbQETRvKdczK for <notmuch@notmuchmail.org>;\r
16         Fri, 26 Mar 2010 14:18:23 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id C6CD04196F3\r
19         for <notmuch@notmuchmail.org>; Fri, 26 Mar 2010 14:18:23 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 2ADFC19F342E;\r
22         Fri, 26 Mar 2010 22:18:22 +0100 (CET)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id SLj3g81tDk4t; Fri, 26 Mar 2010 22:18:20 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id D9EAF19F35E6;\r
30         Fri, 26 Mar 2010 22:18:20 +0100 (CET)\r
31 Received: from steelpick.2x.cz (r5da224.net.upc.cz [86.49.116.224])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 38FC215C062;\r
34         Fri, 26 Mar 2010 22:18:20 +0100 (CET)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.71)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1NvGv5-00067q-MK; Fri, 26 Mar 2010 22:18:19 +0100\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: notmuch@notmuchmail.org\r
40 Date: Fri, 26 Mar 2010 22:18:13 +0100\r
41 Message-Id: <1269638293-23520-1-git-send-email-sojkam1@fel.cvut.cz>\r
42 X-Mailer: git-send-email 1.7.0.2\r
43 Subject: [notmuch] [PATCH] Prevent data loss caused by SIGINT during notmuch\r
44         new\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Fri, 26 Mar 2010 21:18:25 -0000\r
58 \r
59 When Ctrl-C is pressed in a wrong time during notmuch new, it can lead\r
60 to removal of messages from the database even if the files were not\r
61 removed.\r
62 \r
63 It happened at least once to me.\r
64 \r
65 Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>\r
66 ---\r
67  notmuch-new.c |    3 +++\r
68  1 files changed, 3 insertions(+), 0 deletions(-)\r
69 \r
70 diff --git a/notmuch-new.c b/notmuch-new.c\r
71 index 44b50aa..ae89654 100644\r
72 --- a/notmuch-new.c\r
73 +++ b/notmuch-new.c\r
74 @@ -454,6 +454,9 @@ add_files_recursive (notmuch_database_t *notmuch,\r
75         next = NULL;\r
76      }\r
77  \r
78 +    if (state->interrupted)\r
79 +       goto DONE;\r
80 +    \r
81      /* Now that we've walked the whole filesystem list, anything left\r
82       * over in the database lists has been deleted. */\r
83      while (notmuch_filenames_valid (db_files))\r
84 -- \r
85 1.7.0.2\r
86 \r