bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH] Warn user when 2 files conflict on a case insensitive fs


From: Gavin Smith
Subject: Re: [PATCH] Warn user when 2 files conflict on a case insensitive fs
Date: Sat, 7 Jan 2023 00:35:25 +0000

On Sat, Jan 07, 2023 at 12:21:53AM +0100, Patrice Dumas wrote:
> > The manual seems to imply that CASE_INSENSITIVE_FILENAMES does not
> > need to be set by the user if the file system is case insensitive.  If
> > that is true, then the following shouldn't happen:
> 
> As far as I can tell, this is not true, CASE_INSENSITIVE_FILENAMES needs
> to be set by the user.  My recalling is that it can be used to emulate what
> would happen on a case insensitive filesystem even if the filesystem is
> case sensitive.  But it could also be necessary to set it on case
> insensitive filesystems manually.

The manual states:

     If ‘texi2any’ is run on a system which does not distinguish case in
  file names, nodes which are the same except for case (e.g., ‘index’ and
  ‘Index’) will also be folded into the same output file with anchors.
  You can also pretend to be on a case insensitive filesystem by setting
  the customization variable ‘CASE_INSENSITIVE_FILENAMES’.

which implies that setting the variable shouldn't be necessary.

> I do not think that this can be done.  The file is not a regular file,
> but a file used only for redirection.  It could be possible to append
> some text to the file instead of rewriting, without changing the
> redirection, but it does not make much sense to append for a redirection
> file.  It seems to me that on a platform with case insensitive
> filenames, there is no other possibility than having only one
> redirection file.

Indeed, I misunderstood the issue.

> It is as you say if split at node, but otherwise it could be ok
> to have concatenanted files, or it could not be ok, but in any case it
> should be possible to find that there is something amiss, maybe in the
> _normalize_filename_case function. However I do not think that we want
> to warn in that case, it seems to me that in an insensitive file system
> concatenating multiple tree elements together is correct and does not
> require a warning.  For redirection files, however, concatenating is not
> right, but I think that there should only be a warning for redirection
> files, not for regular tree units.

OK.

> Something is puzzling me, upon reading the code, it seems to me that on
> case insensitive systems , and if CASE_INSENSITIVE_FILENAMES is not set,
> and if split at node, the node files should be overwritten, as a file
> including two files will be opened and closed twice instead of elements
> being concatenated.
> 
> Does anybody knows if nodes are correctly concatenated with case
> insensitive filesystems if CASE_INSENSITIVE_FILENAMES is not set?

It would be good to know the answer to this.



reply via email to

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