From 97de273dca8d97039131f9d3f29b2820b5497805 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 Oct 2022 01:48:10 -0700 Subject: [PATCH] Simplify recent "File exists" fix * src/fileio.c (Finsert_file_contents): Simplify previous change that fixed bug#42431. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index a238889803..49553f3c91 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5000,7 +5000,7 @@ because (1) it preserves some marker positions (in unchanged portions 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); -- 2.34.1