index: make lazy check less lazy
We got many reports where the 'lazy check' didn't work too well for people... so make it a bit less lazy, so it'll just work for more people. In practice, never skip _directories_ unless they're leaf directories; this avoids the mtime-does-not-bubble-up problem.
This commit is contained in:
@ -115,12 +115,16 @@ Indexer::Private::handler (const std::string& fullpath, struct stat *statbuf,
|
||||
Scanner::HandleType htype)
|
||||
{
|
||||
switch (htype) {
|
||||
case Scanner::HandleType::EnterDir: {
|
||||
case Scanner::HandleType::EnterDir:
|
||||
case Scanner::HandleType::EnterNewCur: {
|
||||
// in lazy-mode, we ignore this dir if its dirstamp suggest it
|
||||
// is up-to-date (this is _not_ always true; hence we call it
|
||||
// lazy-mode)
|
||||
// lazy-mode); only for actual message dirs, since the dir
|
||||
// tstamps may not bubble up.
|
||||
dirstamp_ = store_.dirstamp(fullpath);
|
||||
if (conf_.lazy_check && dirstamp_ == statbuf->st_mtime) {
|
||||
if (conf_.lazy_check &&
|
||||
dirstamp_ == statbuf->st_mtime &&
|
||||
htype == Scanner::HandleType::EnterNewCur) {
|
||||
g_debug("skip %s (seems up-to-date)", fullpath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user