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

From: Andreas Schwab <[email-masked]>
Date: Mon, 08 Jul 2019 16:37:16 +0200

On Jul 07 2019, Ken Brown <[email-masked]> wrote:

> --- 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)))

This will signal an error if default-directory is not a string.

> +       default_directory = Qnil;
> +    }
>     if (! STRINGP (default_directory))

Just move the test here.

Andreas.

-- 
Andreas Schwab, SUSE Labs, [email-masked]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."