diff options
| author | Rasmus Buurman <dev@rbuurman.de> | 2024-08-06 15:56:08 +0200 |
|---|---|---|
| committer | Rasmus Buurman <dev@rbuurman.de> | 2024-08-06 16:01:39 +0200 |
| commit | 2d7288effa9b3a59da614f9e8f82f355b0e481ee (patch) | |
| tree | 72649900e04a84e741fe68c543b9934e9680bd8f | |
| parent | f01360ae9fefc488fe3e439884fc1499c7bdcdcb (diff) | |
Canonicalize init --maildir argument after expanding
Ensure that `maildir` is an absolute and _canonical_ path when user passes
a custom maildir path using `mu init --maildir PATH`
| -rw-r--r-- | mu/mu-options.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mu/mu-options.cc b/mu/mu-options.cc index 9533e9c..d01c824 100644 --- a/mu/mu-options.cc +++ b/mu/mu-options.cc @@ -459,7 +459,8 @@ sub_init(CLI::App& sub, Options& opts) sub.add_option("--maildir,-m", opts.init.maildir, "Top of the maildir") ->type_name("<maildir>") ->default_val(default_mdir) - ->transform(ExpandPath, "expand maildir path"); + ->transform(ExpandPath, "expand maildir path") + ->transform(CanonicalizePath, "canonicalize maildir path"); sub.add_option("--my-address", opts.init.my_addresses, "Personal e-mail address or regexp") ->type_name("<address>"); |
