diff options
Diffstat (limited to 'src/notmuchworker.cpp')
| -rw-r--r-- | src/notmuchworker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/notmuchworker.cpp b/src/notmuchworker.cpp index c8a2485..bc3ae65 100644 --- a/src/notmuchworker.cpp +++ b/src/notmuchworker.cpp @@ -1476,6 +1476,12 @@ void NotmuchWorker::indexDraftFile(const QString &path, notmuch_database_close(db); notmuch_database_destroy(db); + + // AFTER the close, so a refresh that reaches the database on the next turn + // of the event loop cannot race the write handle this function still held. + // notmuch permits one open handle per process, which is the same ordering + // constraint applyTags() and moveMessages() obey. + emit indexChanged(); } void NotmuchWorker::removeIndexedFile(const QString &path) @@ -1509,6 +1515,8 @@ void NotmuchWorker::removeIndexedFile(const QString &path) notmuch_database_close(db); notmuch_database_destroy(db); + + emit indexChanged(); } void NotmuchWorker::resolveMessages(const QStringList &messageIds, |
