Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d7 / b872e3dc3b6daf318197c6d7d8e6c643657861
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 E8C41417339\r
6         for <notmuch@notmuchmail.org>; Tue, 30 Mar 2010 01:23:28 -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=ham\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 gSsPgvTqQHlZ for <notmuch@notmuchmail.org>;\r
16         Tue, 30 Mar 2010 01:23:28 -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 E8B15431FC1\r
19         for <notmuch@notmuchmail.org>; Tue, 30 Mar 2010 01:23:27 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 42E1C19F340C;\r
22         Tue, 30 Mar 2010 10:23:27 +0200 (CEST)\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 0h3kC7ewMWnj; Tue, 30 Mar 2010 10:23:26 +0200 (CEST)\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 0E06D19F3403;\r
30         Tue, 30 Mar 2010 10:23:26 +0200 (CEST)\r
31 Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 0A4AFFA003;\r
34         Tue, 30 Mar 2010 10:23:26 +0200 (CEST)\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 1NwWjN-0002DX-SB; Tue, 30 Mar 2010 10:23:25 +0200\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: notmuch@notmuchmail.org\r
40 Date: Tue, 30 Mar 2010 10:23:23 +0200\r
41 Message-Id: <1269937403-8495-1-git-send-email-sojkam1@fel.cvut.cz>\r
42 X-Mailer: git-send-email 1.7.0.2\r
43 In-Reply-To: <874ojy9q1z.fsf@steelpick.2x.cz>\r
44 References: <874ojy9q1z.fsf@steelpick.2x.cz>\r
45 Subject: [notmuch] [PATCH] Prevent data loss caused by SIGINT during notmuch\r
46         new\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Tue, 30 Mar 2010 08:23:29 -0000\r
60 \r
61 When Ctrl-C is pressed in a wrong time during notmuch new, it can lead\r
62 to removal of messages from the database even if the files were not\r
63 removed.\r
64 \r
65 It happened at least once to me.\r
66 \r
67 Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>\r
68 ---\r
69  notmuch-new.c |    3 +++\r
70  1 files changed, 3 insertions(+), 0 deletions(-)\r
71 \r
72 diff --git a/notmuch-new.c b/notmuch-new.c\r
73 index 44b50aa..5ade168 100644\r
74 --- a/notmuch-new.c\r
75 +++ b/notmuch-new.c\r
76 @@ -454,6 +454,9 @@ add_files_recursive (notmuch_database_t *notmuch,\r
77         next = NULL;\r
78      }\r
79  \r
80 +    if (interrupted)\r
81 +       goto DONE;\r
82 +    \r
83      /* Now that we've walked the whole filesystem list, anything left\r
84       * over in the database lists has been deleted. */\r
85      while (notmuch_filenames_valid (db_files))\r
86 -- \r
87 1.7.0.2\r
88 \r