Fix insert-file-contents with pipes and /dev/stdin
* src/fileio.c (Finsert_file_contents): Restore logic of non-regular but seekable files. (Bug#65156)
This commit is contained in:
parent
50649a6d1a
commit
dd1d8414b3
1 changed files with 2 additions and 2 deletions
|
@ -4581,7 +4581,7 @@ by calling `format-decode', which see. */)
|
|||
goto handled;
|
||||
}
|
||||
|
||||
if (seekable || !NILP (end))
|
||||
if ((seekable && regular) || !NILP (end))
|
||||
total = end_offset - beg_offset;
|
||||
else
|
||||
/* For a special file, all we can do is guess. */
|
||||
|
@ -4678,7 +4678,7 @@ by calling `format-decode', which see. */)
|
|||
For a special file, where TOTAL is just a buffer size,
|
||||
so don't bother counting in HOW_MUCH.
|
||||
(INSERTED is where we count the number of characters inserted.) */
|
||||
if (seekable || !NILP (end))
|
||||
if ((seekable && regular) || !NILP (end))
|
||||
how_much += this;
|
||||
inserted += this;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue