summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-10-13 01:48:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-10-13 01:48:29 -0700
commit97de273dca8d97039131f9d3f29b2820b5497805 (patch)
tree031219304fc0df40b0fb0ad06277d68f220d143b
parent12f261c4708d58362c9e080a686b0e41821c6db8 (diff)
downloademacs-97de273dca8d97039131f9d3f29b2820b5497805.tar.gz
Simplify recent "File exists" fix
* src/fileio.c (Finsert_file_contents): Simplify previous change that fixed bug#42431.
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
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);