From a71d6a0a1ec50c33d8cb9da971b71166aa208e75 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 29 May 2024 17:41:01 +0300 Subject: [PATCH] Fix error message from 'insert-file-contents' * src/fileio.c (Finsert_file_contents): Consider directories to be "regular" files. (Bug#71258) (cherry picked from commit 8f618711d13fb82b10b67a12f47736e01ec4b92b) --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 960a3b21dc0..9955f83e625 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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; -- 2.39.2