mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 21:54:10 +01:00
lib: Don't needlessly create directory docs in _notmuch_message_remove_filename
Previously, if passed a filename with a directory that did not exist in the database, _notmuch_message_remove_filename would needlessly create that directory document. Fix it so that doesn't happen.
This commit is contained in:
parent
54508eb78d
commit
d9f61c26a1
1 changed files with 2 additions and 2 deletions
|
@ -541,8 +541,8 @@ _notmuch_message_remove_filename (notmuch_message_t *message,
|
||||||
Xapian::TermIterator i, last;
|
Xapian::TermIterator i, last;
|
||||||
|
|
||||||
status = _notmuch_database_filename_to_direntry (
|
status = _notmuch_database_filename_to_direntry (
|
||||||
local, message->notmuch, filename, NOTMUCH_FIND_CREATE, &direntry);
|
local, message->notmuch, filename, NOTMUCH_FIND_LOOKUP, &direntry);
|
||||||
if (status)
|
if (status || !direntry)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
/* Unlink this file from its parent directory. */
|
/* Unlink this file from its parent directory. */
|
||||||
|
|
Loading…
Reference in a new issue