Re: [PATCH] Fix concat_path() functions to work for edge-cases too.

"Kevin J. McCarthy" <[email protected]> Sat, 9 May 2026 09:24:44 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <af6M3G1HIIejfFPs@qinghai>
On Fri, May 08, 2026 at 12:30:01PM -0400, Derek Martin wrote:
>On Fri, May 08, 2026 at 08:59:35PM +0800, Kevin J. McCarthy wrote:
>> This fixes the edge cases tested by Derek Martin.
>
>BTW, I only later noticed there is also mutt_buffer_concatn_path(),
>which has the same bugs, and which is used in exactly one place, and I
>do not see any obvious reason why it should need to be distinguished.
>Probably that function should be deleted and replaced with
>mutt_buffer_concat_path().

Thanks, I'll take a look.

I think this is a special case of expansion, with a size-constrained file 
part.  The directory is always a DT_PATH which always has the / removed, 
and the front of the file is also constrained by the expansion code.

I'll put on my todo to make it "fixed" regardless though.

-- 
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-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmn+jNwACgkQre92hIAx
a9q+dA//cqcdwzDMt9a4I5AXC0rqlVviPgrm9iam3+00BcslV/0bfVoO0VaRujOE
PQvbL+So5ICoPgQsQtb221l+hFFp/rIVoT6eZxg5OHtmNTe92pCUoq+KOrfyDveR
md79otoZHO0pC/36yyIz7K3f+OueAHExvgCHEMizkDx4gknYndQlxi6cV0caQtcz
lb0egfPkhneC8TmjWv59kfQuJBFUzY6CIe8WCi8zdQdlgVYWHES6Xy2j8irKigLx
sL09UWlW4y90GNdnecOkDQ+RO9/zG3h571Hb+aMjZnMLYx/yjDHlBbGijRKTKQDV
9125DjHdjNWe/m4MkUJ8YLoEyI2oUuib5I08FSv7YG9qrZKpgCXY/MMTXJWTupwW
RTRDMrssoSyMUnb4QIbf34qHmTJYxF9y5l+6bqU8eewT31kVa8hUCZ/i2yx+xwct
lm+xFsxcz8MxRIpVi4xurs+OGnuDsU+sFSWSwjQBz6lYBv619Y2YeGnriWArKn3G
0/MK54dkn45rFn5HKL9zIDT6DAhtmedABcybFLiGUa9UkDFFbpjQdlGa9aASpMBx
N4Xy4pCsYiZOZvtlu12aXq0oimpJ3koXP4joIcqun/anGTbzehKlMVLPX/+cFOLo
UrjlD0/gzm4a7flbHVgJ+xa5In+aEFshLlqsWZqeP9T2CKbqQA4=
=ctjh
-----END PGP SIGNATURE-----