Fix bug when visiting euc-jp-encoded directories

Problem reported by Ken Sasaki (Bug#39672).
* src/fileio.c (Ffile_directory_p):
Encode filename before giving it to file_directory_p.
This fixes a typo introduced in
2019-09-18T02:18:14Z!eggert@cs.ucla.edu.
This commit is contained in:
Paul Eggert 2020-02-19 17:21:16 -08:00
parent a2c4eeeecd
commit 62afbc513a

View file

@ -2911,7 +2911,7 @@ See `file-symlink-p' to distinguish symlinks. */)
if (!NILP (handler))
return call2 (handler, Qfile_directory_p, absname);
return file_directory_p (absname) ? Qt : Qnil;
return file_directory_p (ENCODE_FILE (absname)) ? Qt : Qnil;
}
/* Return true if FILE is a directory or a symlink to a directory.