]> git.notmuchmail.org Git - notmuch/commitdiff
lib: Add missing status check in _notmuch_message_remove_filename.
authorAustin Clements <amdragon@mit.edu>
Fri, 10 Jun 2011 19:58:18 +0000 (15:58 -0400)
committerDavid Bremner <bremner@debian.org>
Tue, 13 Sep 2011 02:36:00 +0000 (23:36 -0300)
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

index d993cde834a33baa5614ecf66d8272ed87c273c7..424081f168d3a36c0070d5b630cba199d36bb7ef 100644 (file)
@@ -531,6 +531,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:
      *  1. removing all "folder:" terms