mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-17 23:53:15 +01:00
notmuch_message_tags_to_maildir_flags: Don't exit on failure to rename.
It is totally legitimate for a non-maildir directory to be named "new" (and not have a directory next to it named "cur"). To support this case at least, be silent about any rename failure.
This commit is contained in:
parent
483f422699
commit
37a8096fdc
1 changed files with 3 additions and 7 deletions
|
@ -1009,15 +1009,11 @@ notmuch_message_tags_to_maildir_flags (notmuch_message_t *message)
|
||||||
strcpy (filename_new+(p-filename)+3, flags);
|
strcpy (filename_new+(p-filename)+3, flags);
|
||||||
|
|
||||||
if (strcmp (filename, filename_new) != 0) {
|
if (strcmp (filename, filename_new) != 0) {
|
||||||
notmuch_status_t status;
|
notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
ret = rename (filename, filename_new);
|
ret = rename (filename, filename_new);
|
||||||
if (ret == -1) {
|
if (ret == 0)
|
||||||
perror (talloc_asprintf (message, "rename of %s to %s failed",
|
status = _notmuch_message_rename (message, filename_new);
|
||||||
filename, filename_new));
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
status = _notmuch_message_rename (message, filename_new);
|
|
||||||
|
|
||||||
_notmuch_message_sync (message);
|
_notmuch_message_sync (message);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue