Re: [PATCH] Change mutt_buffer_concatn_path() to use fixed algorithm.
"Kevin J. McCarthy" <[email protected]> Thu, 21 May 2026 09:45:14 +0800
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <ag5jqrji_KS0_anl@qinghai> |
On Tue, May 19, 2026 at 01:56:45PM +0800, Kevin J. McCarthy wrote:
>Revise it to use mutt_buffer_concat_path(), which was fixed in commit
>048f4ae2.
>---
>
>Derek Martin noticed this function was using an incorrect algorithm too.
>
>The function is only called in one place, mutt_complete() which handles
>command prompt completion of path.
>
>*** This commit, however does cause a CHANGE OF BEHAVIOR. ***
>
>When the dir part is empty, the old algorithm concatn_path combines:
> "" + "dir" => "dir"
>
>The new algorithm, now using mutt_buffer_concat_path, combines:
> "" + "dir" => "/dir"
>
>To see the change in mutt, start up mutt and
> - :unset folder<enter>
> - <change-folder>
> - At the prompt: Open mailbox ('?' for list):
> =usr/
> then hit Tab twice.
>
>Before this commit mutt will try to expand "usr" in your cwd.
>After this commit mutt will try to expand "/usr".
>
>You can also see the difference if you start mutt from your homedir, and
>subsitute "usr/" for a directory in your homedir, such as "Documents/".
>
>This is an edge case, but I wanted to bring it up for discussion before
>making this change.
I've pushed this up.
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmoOY6oACgkQre92hIAx a9pxsA/9GGubrNrhTpLBINI+Rf+mfxAMTwsBrrK0ozgBhsDb6vaOPZZbJh1iAJr+ GlB37cuHy+7QNdicChK2I81p3htyrDsWbpXz7knnJ3EG3JuPODST4qo63NkBkaL7 u0SCOAS0/bRikl8YNVoPYiUglU4mg6wKE5xJ3nX4s7xgns5E8Ex8I4krYdFhFG9x vC6sq4zbeeSsSXdi0lvXJ6iB79ggRpu7tI7Le5K2jNFxdgEpZP3u14DYZSCF4/FK 3OgJBWtAnMXeTp7EGf8RGi8r9l7KFX9vHKsyy6s3K9Km56NTBKV+lApPqliNbJEe 7847Kdzhgjf7Wf1KUZ3X41spvTSSvD/7RZbgXNTGK/+iugeE5aP6Ed6/a+OVfnea sXwg//w4z3Gfxfry5JvLXqT543J3jj567cJBT0Ad6Ae6Ip22jHNqda0yBsNIHL8k UDfOnOw0wwxe16tW7iNrx8b0Izi1PXSxJ5bNbrwABe5z7GXxuzdlBXCAT7BC+b3k BpRZLtlJ9/16FoHOGt8E9rbdFh60UzhSvsSh2K0qk97lyfVFMhiQUHpn8Tg2nP3C JmaBtACCdh0IPlr2UWLLEv6qhJfzgpFC9ja8af4aBdQkwkWM5Ob800szGI1ntERr cettSzrnMON2y9YROpNSPZL0EE6DpoXUP+n2tWPZvVubVurLF0I= =6cgO -----END PGP SIGNATURE-----