mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
lib: Return added message even if it already was in the database
This commit is contained in:
parent
08c735c58e
commit
b65a783195
2 changed files with 4 additions and 2 deletions
|
@ -1670,7 +1670,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
||||||
|
|
||||||
DONE:
|
DONE:
|
||||||
if (message) {
|
if (message) {
|
||||||
if (ret == NOTMUCH_STATUS_SUCCESS && message_ret)
|
if ((ret == NOTMUCH_STATUS_SUCCESS ||
|
||||||
|
ret == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) && message_ret)
|
||||||
*message_ret = message;
|
*message_ret = message;
|
||||||
else
|
else
|
||||||
notmuch_message_destroy (message);
|
notmuch_message_destroy (message);
|
||||||
|
|
|
@ -238,7 +238,8 @@ notmuch_database_get_directory (notmuch_database_t *database,
|
||||||
* notmuch database will reference the filename, and will not copy the
|
* notmuch database will reference the filename, and will not copy the
|
||||||
* entire contents of the file.
|
* entire contents of the file.
|
||||||
*
|
*
|
||||||
* If 'message' is not NULL, then, on successful return '*message'
|
* If 'message' is not NULL, then, on successful return
|
||||||
|
* (NOTMUCH_STATUS_SUCCESS or NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) '*message'
|
||||||
* will be initialized to a message object that can be used for things
|
* will be initialized to a message object that can be used for things
|
||||||
* such as adding tags to the just-added message. The user should call
|
* such as adding tags to the just-added message. The user should call
|
||||||
* notmuch_message_destroy when done with the message. On any failure
|
* notmuch_message_destroy when done with the message. On any failure
|
||||||
|
|
Loading…
Reference in a new issue