Re: [PATCH] Add filename filters when saving attachments.

"Kevin J. McCarthy" <[email protected]> Sat, 9 May 2026 20:19:50 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <af8mZocV5oyGH2uI@qinghai>
On Sat, May 09, 2026 at 02:02:54PM +0200, Alejandro Colomar via Mutt-dev wrote:
>> I could also simply filter only "/" -> "_", which might be all we need
>> to do.  Comments?
>
>I think I'd do the simplest change.  And if we want to do more, maybe
>split that into its own commit, with a different justification in the
>commit message.

I'm inclined to do that, and go with just "/" -> "_" too.  I'll wait to 
see what others say, but it seems like just removing "/" should be 
enough.

>> +    {
>> +      if (*filename == '/' || !IsPrint((unsigned char) *filename))
>
>AFAICS, IsPrint() already does the necessary cast.

Thanks!  My mistake for grabbing it from elsewhere and not checking it. 
:-)

-- 
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/JmYACgkQre92hIAx
a9pU1Q//UaGW32jgluSXXsQuyyp3+lR33r+2DqToqVTe7yceMQyLEFDAVtE+41Ph
9kMRtarRh3hOdH6E7DKJ/ZjyQQBdHOn+/dP3LSHpSnPjPP6c59EyUyVMDvCq0Awg
ghdaElqI5sU9jDbfjCdbOzQ6FxDlzHXyhbV+qkuER+MY23CtwweoxYNLtQM2eAWC
VmpH0p41QAQBWeDPXwurG0M9fpgji7hroGmDUth1Uw5DkWw6HdZ3aj71XqxhHUau
06X2AZG3rcUXp3uemIKu5Y0g0HUBCO390ZaQ7HnZSc1wLkw/W8svUtzfLTnSBORV
dQroyYrF8lE6jnimEDJbjCS0altv8xxH/27kr2EMYQoz3hM7OfTBtYo/TkW8/bFz
EgM1IEXrLnLtTSDaa/KR1hUHGUMKCNIB/ZudWslV9o8Lb+QeiGCxj1Ok9hPKpNks
W9kdS0MjYdeBiz+NBNqoAWrymnMiegkhRU7tH0n6k4faRbwpaAtkWQGvFERff5+E
7XPt9SOnisUjNKb4orEQvOwUQd5Jghaq3xx4WLUR4t/Bg9n7anrMIyw6Vs3FOWDB
pMqQn7y6BSCkm3+EwYMJAxMRBpUj11dxrkml5zAAw+B566plIc5b0kvgG8xIWl4z
s2E0dylFEVO9dpIcFdJEXgiJfweoPkLj7Izz2uA5LGLjyieakTo=
=w5Y1
-----END PGP SIGNATURE-----