diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-10-26 21:38:40 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-10-26 21:38:40 +0000 |
commit | 49475635108c55605e3acdb7af390c0a1d6429c4 (patch) | |
tree | 4d569e0b293b89784bf50da66b2ee76e61963a0f /src/fileio.c | |
parent | aa32689c0cbd43587d4af58c77b51f35330eb154 (diff) | |
download | emacs-49475635108c55605e3acdb7af390c0a1d6429c4.tar.gz |
(Faccess_file): Run the argument filename through
Fexpand_file_name, before using it.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c index a5c9972692b..823ab018bcd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3062,19 +3062,21 @@ If there is no error, we return nil. */) (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); + return call3 (handler, Qaccess_file, absname, string); - encoded_filename = ENCODE_FILE (filename); + encoded_filename = ENCODE_FILE (absname); fd = emacs_open (XSTRING (encoded_filename)->data, O_RDONLY, 0); if (fd < 0) |