Commit 9597ee68 authored by Paul Eggert's avatar Paul Eggert

Out-of-datedness .elc check is merely a file test

* src/fileio.c (file_test_errno): Now extern.
* src/lread.c (Fload): Use file_test_errno instead,
since this is really just a file test (the attributes
are not given to the user).
parent 98586c2f
Pipeline #3189 failed with stage
in 90 minutes and 1 second
...@@ -2009,7 +2009,7 @@ longer defaults to 'buffer-file-name'. ...@@ -2009,7 +2009,7 @@ longer defaults to 'buffer-file-name'.
** File metadata primitives now signal an error if I/O, access, or ** File metadata primitives now signal an error if I/O, access, or
other serious errors prevent them from determining the result. other serious errors prevent them from determining the result.
Formerly, these functions often (though not always) returned nil. Formerly, these functions often (though not always) returned nil.
For example, if the directory /etc/firewalld is not searchable, For example, if searching /etc/firewalld results in an I/O error,
(file-symlink-p "/etc/firewalld/firewalld.conf") now signals an error (file-symlink-p "/etc/firewalld/firewalld.conf") now signals an error
instead of returning nil, because file-symlink-p cannot determine instead of returning nil, because file-symlink-p cannot determine
whether a symbolic link exists there. These functions still behave as whether a symbolic link exists there. These functions still behave as
......
...@@ -265,7 +265,7 @@ file_attribute_errno (Lisp_Object file, int err) ...@@ -265,7 +265,7 @@ file_attribute_errno (Lisp_Object file, int err)
enum { PICKY_EACCES = false }; enum { PICKY_EACCES = false };
#endif #endif
static Lisp_Object Lisp_Object
file_test_errno (Lisp_Object file, int err) file_test_errno (Lisp_Object file, int err)
{ {
if (!PICKY_EACCES && err == EACCES) if (!PICKY_EACCES && err == EACCES)
......
...@@ -4315,6 +4315,7 @@ extern AVOID report_file_errno (const char *, Lisp_Object, int); ...@@ -4315,6 +4315,7 @@ extern AVOID report_file_errno (const char *, Lisp_Object, int);
extern AVOID report_file_error (const char *, Lisp_Object); extern AVOID report_file_error (const char *, Lisp_Object);
extern AVOID report_file_notify_error (const char *, Lisp_Object); extern AVOID report_file_notify_error (const char *, Lisp_Object);
extern Lisp_Object file_attribute_errno (Lisp_Object, int); extern Lisp_Object file_attribute_errno (Lisp_Object, int);
extern Lisp_Object file_test_errno (Lisp_Object, int);
extern bool internal_delete_file (Lisp_Object); extern bool internal_delete_file (Lisp_Object);
extern Lisp_Object check_emacs_readlinkat (int, Lisp_Object, char const *); extern Lisp_Object check_emacs_readlinkat (int, Lisp_Object, char const *);
extern bool file_directory_p (Lisp_Object); extern bool file_directory_p (Lisp_Object);
......
...@@ -1358,7 +1358,7 @@ Return t if the file exists and loads successfully. */) ...@@ -1358,7 +1358,7 @@ Return t if the file exists and loads successfully. */)
make_fixnum (-1)); make_fixnum (-1));
} }
if (result != 0) if (result != 0)
file_attribute_errno (found, err); file_test_errno (found, err);
else if (timespec_cmp (get_stat_mtime (&s1), else if (timespec_cmp (get_stat_mtime (&s1),
get_stat_mtime (&s2)) get_stat_mtime (&s2))
< 0) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment