mirror of https://github.com/djcb/mu.git
indexer: use ctime, not mtime
So we update if _anything_ changes with the file, not just the contents.
This commit is contained in:
parent
e067bca090
commit
5da066a59e
|
@ -145,11 +145,11 @@ Indexer::Private::handler(const std::string& fullpath, struct stat* statbuf,
|
|||
// 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_ctime &&
|
||||
htype == Scanner::HandleType::EnterNewCur) {
|
||||
g_debug("skip %s (seems up-to-date: %s >= %s)", fullpath.c_str(),
|
||||
time_to_string("%FT%T", dirstamp_).c_str(),
|
||||
time_to_string("%FT%T", statbuf->st_mtime).c_str());
|
||||
time_to_string("%FT%T", statbuf->st_ctime).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ Indexer::Private::handler(const std::string& fullpath, struct stat* statbuf,
|
|||
|
||||
// if the message is not in the db yet, or not up-to-date, queue
|
||||
// it for updating/inserting.
|
||||
if (statbuf->st_mtime <= dirstamp_ && store_.contains_message(fullpath)) {
|
||||
if (statbuf->st_ctime <= dirstamp_ && store_.contains_message(fullpath)) {
|
||||
// g_debug ("skip %s: already up-to-date");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue