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

@ -77,7 +77,7 @@ print_stats(const Indexer::Progress& stats, bool color)
Result<void>
Mu::mu_cmd_index(Store& store, const Options& opts)
{
const auto mdir{store.properties().root_maildir};
const auto mdir{store.root_maildir()};
if (G_UNLIKELY(access(mdir.c_str(), R_OK) != 0))
return Err(Error::Code::File, "'%s' is not readable: %s",
mdir.c_str(), g_strerror(errno));
@ -89,8 +89,8 @@ Mu::mu_cmd_index(Store& store, const Options& opts)
std::cout << "lazily ";
std::cout << "indexing maildir " << col.fg(Color::Green)
<< store.properties().root_maildir << col.reset() << " -> store "
<< col.fg(Color::Green) << store.properties().database_path << col.reset()
<< store.root_maildir() << col.reset() << " -> store "
<< col.fg(Color::Green) << store.path() << col.reset()
<< std::endl;
}

View File

@ -120,8 +120,8 @@ Mu::mu_cmd_server(const Mu::Options& opts) try {
Server server{*store, output_sexp_stdout};
g_message("created server with store @ %s; maildir @ %s; debug-mode %s;"
"readline: %s",
store->properties().database_path.c_str(),
store->properties().root_maildir.c_str(),
store->path().c_str(),
store->root_maildir().c_str(),
opts.debug ? "yes" : "no",
have_readline() ? "yes" : "no");

View File

@ -71,7 +71,11 @@ handle_result(const Result<void>& res, const Mu::Options& opts)
std::cerr << "Perhaps mu is already running?\n";
break;
case Error::Code::SchemaMismatch:
std::cerr << "Please (re)initialize mu with 'mu init' "
std::cerr << "Please (re)initialize mu with 'mu init'; "
<< "see mu-init(1) for details\n";
break;
case Error::Code::CannotReinit:
std::cerr << "Invoke 'mu init' without '--reinit'; "
<< "see mu-init(1) for details\n";
break;
default: