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:
@ -96,14 +96,15 @@ Scanner::Private::process_dentry (const std::string& path, struct dirent *dentry
|
||||
}
|
||||
|
||||
if (S_ISDIR(statbuf.st_mode)) {
|
||||
|
||||
const auto res = handler_(fullpath, &statbuf, Scanner::HandleType::EnterDir);
|
||||
if (!res) {
|
||||
//g_debug ("skipping dir %s", fullpath.c_str());
|
||||
const auto new_cur = is_new_cur(dentry->d_name);
|
||||
const auto htype = new_cur ?
|
||||
Scanner::HandleType::EnterNewCur :
|
||||
Scanner::HandleType::EnterDir;
|
||||
const auto res = handler_(fullpath, &statbuf, htype);
|
||||
if (!res)
|
||||
return true; // skip
|
||||
}
|
||||
|
||||
process_dir (fullpath, is_new_cur(dentry->d_name));
|
||||
process_dir (fullpath, new_cur);
|
||||
|
||||
return handler_(fullpath, &statbuf, Scanner::HandleType::LeaveDir);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user