]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify recent "File exists" fix
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Oct 2022 08:48:10 +0000 (01:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Oct 2022 08:48:29 +0000 (01:48 -0700)
* src/fileio.c (Finsert_file_contents):
Simplify previous change that fixed bug#42431.

src/fileio.c

index a238889803493196e14b3e7142fa82aa68095c80..49553f3c91f3f86722fd45f1502ba36fe72188e6 100644 (file)
@@ -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);