Fix error message from 'insert-file-contents'

* src/fileio.c (Finsert_file_contents): Consider directories
to be "regular" files.  (Bug#71258)
This commit is contained in:
Eli Zaretskii 2024-05-29 17:41:01 +03:00
parent 608e9a5806
commit 8f618711d1

View file

@ -4188,7 +4188,7 @@ by calling `format-decode', which see. */)
named pipes, and it's probably just not worth it. So we should
at least signal an error. */
if (!S_ISREG (st.st_mode))
if (!(S_ISREG (st.st_mode) || S_ISDIR (st.st_mode)))
{
regular = false;