mirror of https://github.com/djcb/mu.git
index: rely less on dir tstamp when indexing
Let's use the _current time_ (time(NULL)) instead of the dir-tstamp for a maildir; this avoids re-indexing mail where the mails have a newer time, but their directory hasn't (e.g. 'touch') Experimental, let see how this works.
This commit is contained in:
parent
f769476a51
commit
87ac89b082
|
@ -123,7 +123,7 @@ Indexer::Private::handler (const std::string& fullpath, struct stat *statbuf,
|
|||
// tstamps may not bubble up.
|
||||
dirstamp_ = store_.dirstamp(fullpath);
|
||||
if (conf_.lazy_check &&
|
||||
dirstamp_ == statbuf->st_mtime &&
|
||||
dirstamp_ >= statbuf->st_mtime &&
|
||||
htype == Scanner::HandleType::EnterNewCur) {
|
||||
g_debug("skip %s (seems up-to-date)", fullpath.c_str());
|
||||
return false;
|
||||
|
@ -151,7 +151,7 @@ Indexer::Private::handler (const std::string& fullpath, struct stat *statbuf,
|
|||
|
||||
}
|
||||
case Scanner::HandleType::LeaveDir: {
|
||||
store_.set_dirstamp(fullpath, statbuf->st_mtime);
|
||||
store_.set_dirstamp(fullpath, ::time(NULL));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue