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: Torbjorn SVENSSON
Subject: Re: [PATCH] Warn user when 2 files conflict on a case insensitive fs
Date: Sun, 15 Jan 2023 18:09:26 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1



On 2023-01-11 23:07, Patrice Dumas wrote:
On Wed, Jan 11, 2023 at 06:35:01PM +0100, Torbjorn SVENSSON wrote:


On 2023-01-11 08:48, Patrice Dumas wrote:
Hello,

Here is a commit which should bring in explicit error messages about
conflicts among redirection pages and with other output files:
https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=2d279f1d39bf026eeb243beb9f00aecb0b0bf2d2

Still need to set CASE_INSENSITIVE_FILENAMES=1 for case insensitive
filesystems.


I checked out this commit and tried it with the test case that I added in my
the patch, but I do not see the expected outcome.

- If I run without CASE_INSENSITIVE_FILENAMES=1, I get 2 files Foo.html and
foo.html. This is as expected.

- If I run with CASE_INSENSITIVE_FILENAMES=1, I only get 1 file, Foo.html
with no warning and no error.

I can see, using Data::Dumper, that the only entry in
$self->{'elements_in_file_count'}, right before the comment "first condition
finds conflict with tree elements", is one for "index.html".
Is this intended or should there also have been an entry for "foo.html" in
this case?

It is intended, as in $self->{'elements_in_file_count'} there are only
tree element file names.  There should be an entry for "foo.html" in
%redirection_filenames and there is one.  The actual problem is
that the redirection file name does not have the case normalized before
comparison of file names, case normalization is done, but too late.  It
should be fixed in commit:

https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=35562a61f257b12b07e66dbac08d8c3ce9861834

I added your test in that commit too.  Thanks for the report!


I fetched these new changes and tried it again. Now I see the warning that was missing. Thank you!

Would it still make sense to try to add all the redirects to the page when using the CASE_INSENSITIVE_FILENAMES option and let the user select the right one?



reply via email to

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