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 /src/callproc.c | |
| 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 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index dbbf15c792a..007465cd405 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1567,12 +1567,12 @@ init_callproc (void) | |||
| 1567 | 1567 | ||
| 1568 | tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory); | 1568 | tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory); |
| 1569 | if (!NILP (Fequal (srcdir, Vinvocation_directory)) | 1569 | if (!NILP (Fequal (srcdir, Vinvocation_directory)) |
| 1570 | || !file_access_p (SSDATA (tem), F_OK)) | 1570 | || NILP (Ffile_exists_p (tem))) |
| 1571 | { | 1571 | { |
| 1572 | Lisp_Object newdir; | 1572 | Lisp_Object newdir; |
| 1573 | newdir = Fexpand_file_name (build_string ("../etc/"), lispdir); | 1573 | newdir = Fexpand_file_name (build_string ("../etc/"), lispdir); |
| 1574 | tem = Fexpand_file_name (build_string ("NEWS"), newdir); | 1574 | tem = Fexpand_file_name (build_string ("NEWS"), newdir); |
| 1575 | if (file_access_p (SSDATA (tem), F_OK)) | 1575 | if (!NILP (Ffile_exists_p (tem))) |
| 1576 | Vdata_directory = newdir; | 1576 | Vdata_directory = newdir; |
| 1577 | } | 1577 | } |
| 1578 | } | 1578 | } |