all: update for API changes (config etc.)

Use the new & improved APIs.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-01 18:20:51 +03:00
parent 2acc1c2271
commit c6fff6a281
16 changed files with 72 additions and 67 deletions

View File

@ -78,14 +78,15 @@ private:
struct Indexer::Private {
Private(Mu::Store& store)
: store_{store}, scanner_{store_.properties().root_maildir,
[this](auto&& path, auto&& statbuf, auto&& info) {
: store_{store}, scanner_{store_.root_maildir(),
[this](auto&& path,
auto&& statbuf, auto&& info) {
return handler(path, statbuf, info);
}},
max_message_size_{store_.properties().max_message_size} {
max_message_size_{store_.config().get<Mu::Config::Id::MaxMessageSize>()} {
g_message("created indexer for %s -> %s (batch-size: %zu)",
store.properties().root_maildir.c_str(),
store.properties().database_path.c_str(), store.properties().batch_size);
store.root_maildir().c_str(),
store.path().c_str(), store.config().get<Mu::Config::Id::BatchSize>());
}
~Private() {
@ -410,7 +411,7 @@ Indexer::~Indexer() = default;
bool
Indexer::start(const Indexer::Config& conf)
{
const auto mdir{priv_->store_.properties().root_maildir};
const auto mdir{priv_->store_.root_maildir()};
if (G_UNLIKELY(access(mdir.c_str(), R_OK) != 0)) {
g_critical("'%s' is not readable: %s", mdir.c_str(), g_strerror(errno));
return false;