Skip to content

Commit

Permalink
Canonicalize init --maildir argument after expanding
Browse files Browse the repository at this point in the history
Ensure that `maildir` is an absolute and _canonical_ path when user passes
a custom maildir path using `mu init --maildir PATH`
  • Loading branch information
rabuu committed Aug 6, 2024
1 parent f01360a commit 2d7288e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mu/mu-options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down

0 comments on commit 2d7288e

Please sign in to comment.