diff options
| author | Anton Khirnov <anton@khirnov.net> | 2025-08-06 07:43:06 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2025-08-09 07:12:23 -0300 |
| commit | aa761727999b105711ba4ca789e0836a0a05cf9f (patch) | |
| tree | 560091147ab6db4c6e1b0a6a34451f34963a7a03 /lib/directory.cc | |
| parent | bee7a53194606757997f069f0e95ac862fbba0e0 (diff) | |
lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate
The overall goal is to allow clients to restart operations in
situations where that is the response recommended by the underlying
Xapian library.
Amended-by: db, added above explanation
Diffstat (limited to 'lib/directory.cc')
| -rw-r--r-- | lib/directory.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/directory.cc b/lib/directory.cc index 5cf64d7f..dea0a225 100644 --- a/lib/directory.cc +++ b/lib/directory.cc @@ -206,7 +206,7 @@ _notmuch_directory_find_or_create (notmuch_database_t *notmuch, notmuch->exception_reported = true; notmuch_directory_destroy (directory); directory = NULL; - *status_ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION; + *status_ret = _notmuch_xapian_error (); } DONE: @@ -247,7 +247,7 @@ notmuch_directory_set_mtime (notmuch_directory_t *directory, "A Xapian exception occurred setting directory mtime: %s.\n", error.get_msg ().c_str ()); notmuch->exception_reported = true; - return NOTMUCH_STATUS_XAPIAN_EXCEPTION; + return _notmuch_xapian_error (); } return NOTMUCH_STATUS_SUCCESS; @@ -321,7 +321,7 @@ notmuch_directory_delete (notmuch_directory_t *directory) "A Xapian exception occurred deleting directory entry: %s.\n", error.get_msg ().c_str ()); directory->notmuch->exception_reported = true; - status = NOTMUCH_STATUS_XAPIAN_EXCEPTION; + status = _notmuch_xapian_error (); } notmuch_directory_destroy (directory); |
