From: Paul Eggert Date: Thu, 13 Oct 2022 08:48:10 +0000 (-0700) Subject: Simplify recent "File exists" fix X-Git-Tag: emacs-29.0.90~1616^2~641 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=97de273dca8d97039131f9d3f29b2820b5497805;p=emacs.git Simplify recent "File exists" fix * src/fileio.c (Finsert_file_contents): Simplify previous change that fixed bug#42431. --- diff --git a/src/fileio.c b/src/fileio.c index a2388898034..49553f3c91f 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5000,7 +5000,7 @@ by calling `format-decode', which see. */) unbind_to (count1, Qnil); } - if (NILP (handler) && !NILP (visit) && current_buffer->modtime.tv_nsec < 0) + if (save_errno != 0) { /* Signal an error if visiting a file that could not be opened. */ report_file_errno ("Opening input file", orig_filename, save_errno);