[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f367b01f128: * src/fileio.c (Finsert_file_contents): Fix last cha
From: |
Eli Zaretskii |
Subject: |
master f367b01f128: * src/fileio.c (Finsert_file_contents): Fix last change. |
Date: |
Sun, 19 Jan 2025 07:20:52 -0500 (EST) |
branch: master
commit f367b01f128223d3fc7c34985eccce744333fa8f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
* src/fileio.c (Finsert_file_contents): Fix last change.
---
src/fileio.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/fileio.c b/src/fileio.c
index bf80d71ab59..9ab17497395 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4754,6 +4754,11 @@ by calling `format-decode', which see. */)
/* For a special file that is not seekable, all we can do is guess. */
total = READ_BUF_SIZE;
+ /* From here on, treat a file with zero size as not seekable. This
+ causes us to read until we actually hit EOF. */
+ if (regular && st.st_size == 0)
+ seekable = false;
+
if (NILP (visit) && total > 0)
{
if (!NILP (BVAR (current_buffer, file_truename))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f367b01f128: * src/fileio.c (Finsert_file_contents): Fix last change.,
Eli Zaretskii <=