[PATCH 03/17] lib: Add missing status check in _notmuch_message_remove_filename.

Subject: [PATCH 03/17] lib: Add missing status check in _notmuch_message_remove_filename.

Date: Sat, 11 Jun 2011 16:04:29 -0400

To: notmuch@notmuchmail.org

Cc: Austin Clements

From: Austin Clements


Previously, this function would synchronize the folder list even if
removing the file name failed.  Now it returns immediately if removing
the file name fails.
---
 lib/message.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/message.cc b/lib/message.cc
index 4b59fa9..afb1d80 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -529,6 +529,8 @@ _notmuch_message_remove_filename (notmuch_message_t *message,
 						   "file-direntry", direntry);
     status = COERCE_STATUS (private_status,
 			    "Unexpected error from _notmuch_message_remove_term");
+    if (status)
+	return status;
 
     /* Re-synchronize "folder:" terms for this message. This requires
      * first removing all "folder:" terms, then adding back terms for
-- 
1.7.5.1


Thread: