all: update for API changes (config etc.)
Use the new & improved APIs.
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user