Paul Eggert writes: > On 12/10/21 04:06, Jan Nieuwenhuizen wrote: >> (thanks to your input on my previous patch, we discussed and decided not >> to do case folding in our client code either). > > That patch still tries to case-fold one-letter drive specs, though - > why bother doing that if you don't case-fold the rest of the file > name?
Do you see a cheap way to return the correct casing for the rest of the file name? That could be nice, maybe a change like that has a chance of being accepted. I agree it's quite debatable and a bit arbitrary to correct drive name casing. The reasons why opted to put in after all are: * it's cheap (I had the impression that if we found a cheap way to return the canonical casing for the full file name, as opposed to the unacceptably expensive scandir "solution", it might be something that could be discussed), * if a user uses a "wrongly cased" file name and expects the system to work, that is sloppy and non-portable; it is acceptable for the system not to "guess" and "correct" here, * returning different casing of the drive letter can lead to the result of canonicalize_file_name to be less canonical (as I showed). So, I included it because the "too expensive" and "not portable" arguments do not hold for the drive letter, and it has a positive effect on the "canonicalness" of the result. I would be susceptible to the argument: correct all casing or correct none, though, and remove that bit from this patch. Greetings, Janneke -- Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com