aboutsummaryrefslogtreecommitdiff
path: root/notmuch.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-10-24 22:11:38 -0700
committerCarl Worth <cworth@cworth.org>2009-10-24 22:11:38 -0700
commit309c0e1cc5757e153263b580e60f613f45df630e (patch)
tree088a83f695b402c0c9a2afa3ed69359485e50415 /notmuch.c
parent0bc73af96c48952cba29116f0c99e8ba3f9e7ef6 (diff)
notmuch setup/new: Propagate failure from notmuch_database_set_timestamp
With some recent testing, the timestamp was failing, (overflowing the term limit), and reporting an error, but the top-level notmuch command was still returning a success return value. I think it's high time to add a test suite, (and the code base is small enough that if we add it now it shouldn't be *too* hard to shoot for a very high coverage percentage).
Diffstat (limited to 'notmuch.c')
-rw-r--r--notmuch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/notmuch.c b/notmuch.c
index 8981ff3..515ec21 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -270,7 +270,9 @@ add_files_recursive (notmuch_database_t *notmuch,
next = NULL;
}
- notmuch_database_set_timestamp (notmuch, path, path_mtime);
+ status = notmuch_database_set_timestamp (notmuch, path, path_mtime);
+ if (status && ret == NOTMUCH_STATUS_SUCCESS)
+ ret = status;
DONE:
if (next)