projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba1b93
)
lib: update cached mtime in notmuch_directory_set_mtime
author
David Bremner
<david@tethera.net>
Mon, 27 Jun 2016 20:43:04 +0000
(22:43 +0200)
committer
David Bremner
<david@tethera.net>
Tue, 23 Aug 2016 23:58:46 +0000
(20:58 -0300)
Without this change, the following code fails
notmuch_directory_set_mtime(dir, 12345);
assert(notmuch_directory_get_mtime(dir) == 12345);
lib/directory.cc
patch
|
blob
|
history
diff --git
a/lib/directory.cc
b/lib/directory.cc
index a19f7779881d8ff0b8da9c2b02a2a2645568facb..5de3319c47d1457f92da38f00717507e67684d9c 100644
(file)
--- a/
lib/directory.cc
+++ b/
lib/directory.cc
@@
-227,6
+227,9
@@
notmuch_directory_set_mtime (notmuch_directory_t *directory,
Xapian::sortable_serialise (mtime));
db->replace_document (directory->document_id, directory->doc);
+
+ directory->mtime = mtime;
+
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch,
"A Xapian exception occurred setting directory mtime: %s.\n",