diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-02-26 01:04:47 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-02-26 01:08:44 +0200 |
| commit | dcbcd697f4b0973f67353ac23574a8cd9a727824 (patch) | |
| tree | 9f7ecd0d2c5ef9fd241f31cc05040fe8daeab9fc /mu | |
| parent | 915335fd768965c8a3db7ab902bc59ff7824693b (diff) | |
mu-init: insist that --maildir is absolute
Diffstat (limited to 'mu')
| -rw-r--r-- | mu/mu-cmd-init.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mu/mu-cmd-init.cc b/mu/mu-cmd-init.cc index 210ead5..26a9600 100644 --- a/mu/mu-cmd-init.cc +++ b/mu/mu-cmd-init.cc @@ -45,6 +45,9 @@ Mu::mu_cmd_init(const Options& opts) return Err(Error::Code::InvalidArgument, "missing --maildir parameter and could " "not determine default"); + else if (!g_path_is_absolute(opts.init.maildir.c_str())) + return Err(Error{Error::Code::File, + "--maildir is not absolute"}); MemDb mdb; Config conf{mdb}; |
