[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] canonicalize-lgpl: Canonicalize drive and dirsep too for Min

From: Jan Nieuwenhuizen
Subject: Re: [PATCH] canonicalize-lgpl: Canonicalize drive and dirsep too for MinGW.
Date: Sat, 11 Dec 2021 12:16:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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

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.


Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]