Mercurial > emacs
changeset 40354:3f7dedbea4ea
(Faccess_file): Run the argument filename through
Fexpand_file_name, before using it.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 26 Oct 2001 21:38:40 +0000 |
parents | 1e1c2c459774 |
children | 2c93c52edc86 |
files | src/fileio.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Fri Oct 26 21:27:19 2001 +0000 +++ b/src/fileio.c Fri Oct 26 21:38:40 2001 +0000 @@ -3062,19 +3062,21 @@ (filename, string) Lisp_Object filename, string; { - Lisp_Object handler, encoded_filename; + Lisp_Object handler, encoded_filename, absname; int fd; CHECK_STRING (filename, 0); + absname = Fexpand_file_name (filename, Qnil); + CHECK_STRING (string, 1); /* If the file name has special constructs in it, call the corresponding file handler. */ - handler = Ffind_file_name_handler (filename, Qaccess_file); + handler = Ffind_file_name_handler (absname, Qaccess_file); if (!NILP (handler)) - return call3 (handler, Qaccess_file, filename, string); - - encoded_filename = ENCODE_FILE (filename); + return call3 (handler, Qaccess_file, absname, string); + + encoded_filename = ENCODE_FILE (absname); fd = emacs_open (XSTRING (encoded_filename)->data, O_RDONLY, 0); if (fd < 0)