mu-init: insist that --maildir is absolute
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user