Subject: Re: bug#56443: 28.1; Mac segmentation fault with ffap

From: Stephen Eglen <[email-masked]>
Date: Fri, 08 Jul 2022 17:12:21 +0100

Thank you Mattias; working from master I can confirm I do not see an
error now.

Stephen

On Fri, Jul 08 2022, Mattias Engdegård wrote:

> 8 juli 2022 kl. 12.45 skrev Eli Zaretskii <[email-masked]>:
>
>> Fine with me, but please update the comment to this effect.
>
> Certainly.
>
>> But why does the original call to file_name_case_insensitive_err fail
>> in this case with err > 0 on macOS, and what is the value of err?
>
> It fails because the argument, "mailto:[email-masked]", is not an
> existing file and so pathconf(filename, _PC_CASE_SENSITIVE) returns -1
> which means "don't know". (If a file of that name is indeed created
> then it returns 0 here because this is a case-insensitive file
> system.)
>
> Perhaps we shouldn't ask about case-sensitivity for such names but
> then again those are legal file names to open and
> Ffile_name_insensitive_p doesn't know the intentions of the caller,
> and in any case the error leads us to try the parent directory which
> doesn't exist so everything works out for the best with the patch.
>
> Pushed to master, with a test.