emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c522021a30: Fix misleading "File exists, but cannot be read" in b


From: Lars Ingebrigtsen
Subject: master c522021a30: Fix misleading "File exists, but cannot be read" in browse-url-emacs
Date: Thu, 13 Oct 2022 03:00:31 -0400 (EDT)

branch: master
commit c522021a3019fa8f8598319a867326ec59b2bfaf
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix misleading "File exists, but cannot be read" in browse-url-emacs
    
    * src/fileio.c (Finsert_file_contents): Don't signal an error
    about not being able to open the file when we're fetching things
    via handlers -- in that case, modtime isn't necessarily set, and
    if there's a handler, it should take care of this (bug#42431).
---
 src/fileio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fileio.c b/src/fileio.c
index dd7f85ec97..a238889803 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 (visit) && current_buffer->modtime.tv_nsec < 0)
+  if (NILP (handler) && !NILP (visit) && current_buffer->modtime.tv_nsec < 0)
     {
       /* Signal an error if visiting a file that could not be opened.  */
       report_file_errno ("Opening input file", orig_filename, save_errno);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]