diff options
| author | Paul Eggert | 2019-09-21 11:27:46 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-09-21 11:38:36 -0700 |
| commit | d49d6ea9677eea1d30aae4244934b1c7336e35a3 (patch) | |
| tree | c671f33693f458a7ba992a2a97250f620aec861d /etc | |
| parent | 56213b15e65a350f3f8cd9426a97691d8ff217ee (diff) | |
| download | emacs-d49d6ea9677eea1d30aae4244934b1c7336e35a3.tar.gz emacs-d49d6ea9677eea1d30aae4244934b1c7336e35a3.zip | |
Revert too-picky file-access tests
Problem reported by Andreas Schwab (Bug#37475).
* doc/lispref/files.texi (Writing to Files)
(Testing Accessibility, Kinds of Files):
Document that accessibility and file-type predicates return nil
if there is trouble determining accessibility or type.
* etc/NEWS: Adjust, and list the affected primitives.
* src/callproc.c (init_callproc): Go back to Ffile_exists_p.
* src/fileio.c (PICKY_EACCES, file_test_errno):
Remove. All uses removed.
(Ffile_name_case_insensitive_p, Ffile_exists_p, Ffile_symlink_p)
(Ffile_directory_p, Ffile_regular_p): Document that these
functions return nil if there is trouble.
(Ffile_name_case_insensitive_p, check_file_access)
(Ffile_writable_p, Ffile_symlink_p, Ffile_directory_p)
(Ffile_accessible_directory_p, Ffile_regular_p)
* src/lread.c (Fload):
Go back to treating trouble in determining the answer as if the
file were missing.
* src/fileio.c (Ffile_newer_than_file_p): Use file_attribute_errno
not file_test_errno, since returning nil is not appropriate when
there are two files to test; e.g., in the rare cases where both
file timestamps have overflowed then neither t nor nil is correct.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 13 |
1 files changed, 8 insertions, 5 deletions
| @@ -2029,11 +2029,14 @@ longer defaults to 'buffer-file-name'. | |||
| 2029 | ** File metadata primitives now signal an error if I/O, access, or | 2029 | ** File metadata primitives now signal an error if I/O, access, or |
| 2030 | other serious errors prevent them from determining the result. | 2030 | other serious errors prevent them from determining the result. |
| 2031 | Formerly, these functions often (though not always) returned nil. | 2031 | Formerly, these functions often (though not always) returned nil. |
| 2032 | For example, if searching /etc/firewalld results in an I/O error, | 2032 | For example, if there is an access error, I/O error or low-level |
| 2033 | (file-symlink-p "/etc/firewalld/firewalld.conf") now signals an error | 2033 | integer overflow when getting the attributes of a file F, |
| 2034 | instead of returning nil, because file-symlink-p cannot determine | 2034 | (file-attributes F) now signals an error instead of returning nil. |
| 2035 | whether a symbolic link exists there. These functions still behave as | 2035 | These functions still behave as before if the only problem is that the |
| 2036 | before if the only problem is that the file does not exist. | 2036 | file does not exist. The affected primitives are |
| 2037 | directory-files-and-attributes, file-acl, file-attributes, file-modes, | ||
| 2038 | file-newer-than-file-p, file-selinux-context, file-system-info, and | ||
| 2039 | set-visited-file-modtime. | ||
| 2037 | 2040 | ||
| 2038 | --- | 2041 | --- |
| 2039 | ** The function 'eldoc-message' now accepts a single argument. | 2042 | ** The function 'eldoc-message' now accepts a single argument. |