]> git.eshelyaron.com Git - emacs.git/commit
insert-file-contents SEEK_END optimization
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Jul 2025 17:46:33 +0000 (10:46 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Jul 2025 08:11:31 +0000 (10:11 +0200)
commitbf3ef2a3516d7e4ab3a36045e89b264d4a98c14b
tree485f3189166a36e77b730b8246423774c9efd0a4
parent0d043c60fbd99d76142dc345a61b89f92e8e338d
insert-file-contents SEEK_END optimization

This improves on recent fixes to Bug#77315.
* src/fileio.c (Finsert_file_contents):
Do not give up on seeking merely because SEEK_END fails.
On some files (/proc/cpuinfo, say) SEEK_END can fail
even though SEEK_SET and SEEK_CUR succeed, and the
code still works in this case.

(cherry picked from commit 1b517a4fe0a8362160c5aee403baf29952d5d559)
src/fileio.c