summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index dd7f85ec97f..a2388898034 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);