mu-init: insist that --maildir is absolute

This commit is contained in:
Dirk-Jan C. Binnema
2024-02-26 01:04:47 +02:00
parent 915335fd76
commit dcbcd697f4
4 changed files with 12 additions and 4 deletions

View File

@ -89,8 +89,12 @@ struct Store::Private {
Config make_config(XapianDb& xapian_db, const std::string& root_maildir,
Option<const Config&> conf) {
Config config{xapian_db};
if (!g_path_is_absolute(root_maildir.c_str()))
throw Error{Error::Code::File,
"root maildir path is not absolute ({})",
root_maildir};
Config config{xapian_db};
if (conf)
config.import_configurable(*conf);

View File

@ -77,8 +77,8 @@ public:
* Construct a store for a not-yet-existing document database
*
* @param path path to the database
* @param root_maildir maildir to use for this store
* @param config a configuration object
* @param root_maildir absolute path to maildir to use for this store
* @param conf a configuration object
*
* @return a store or an error
*/