Subject: Re: bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Jul 2019 15:25:27 +0300

> From: Ken Brown <[email-masked]>
> CC: "[email-masked]" <[email-masked]>, "[email-masked]"
> 	<[email-masked]>, "[email-masked]" <[email-masked]>
> Date: Sun, 7 Jul 2019 19:30:00 +0000
> 
> --- a/src/fileio.c
> +++ b/src/fileio.c
> @@ -804,7 +804,11 @@ DEFUN ("expand-file-name", Fexpand_file_name, 
> Sexpand_file_name, 1, 2, 0,
> 
>     /* Use the buffer's default-directory if DEFAULT_DIRECTORY is omitted.  */
>     if (NILP (default_directory))
> -    default_directory = BVAR (current_buffer, directory);
> +    {
> +      default_directory = BVAR (current_buffer, directory);
> +      if (NILP (Ffile_name_absolute_p (default_directory)))
> +       default_directory = Qnil;
> +    }

Hmm... why nullify it?  Why not simply call expand-file-name
recursively?