]> git.eshelyaron.com Git - emacs.git/commit
Avoid EOVERFLOW problems with file-directory-p
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 3 Feb 2018 20:10:19 +0000 (12:10 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 3 Feb 2018 20:19:24 +0000 (12:19 -0800)
commit327d251f8a857350a78029c31c7ab3f9797cc727
tree06cf0b606cb68a3576960fe1befab7aa188777d5
parenta34c7d7470d5f749659658943bd4084942d873e3
Avoid EOVERFLOW problems with file-directory-p

This fixes a bug where (file-directory-p FOO) would fail if FOO
had an inode number out of range for ‘stat’.
* src/fileio.c (file_directory_p): Accept a Lisp string instead of
a C string.  All callers changed.  On non-MS-Windows hosts, use
openat with O_PATH|O_DIRECTORY if available, otherwise
file_accessible_directory_p unless it fails due to EACCESS,
otherwise stat.
src/fileio.c
src/lisp.h
src/lread.c