Subject: 28.0.50; can't visit directory in Dired
From: Paul Eggert <[email-masked]>
To: Kan Sasaki <[email-masked]>
Cc: [email-masked]
Date: Wed, 19 Feb 2020 18:06:39 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for reporting the bug. That is a regression in Emacs 27, and I 
reproduced the bug there, so I installed the attached patch (which is 
smaller and which I think is better) into the emacs-27 branch.

PS. Although I unfortunately mispelled your name in the attached file, I 
fixed the misspelling in the corresponding ChangeLog.3 file, which is 
what will be distributed in the next Emacs release. See:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-27&id=1d10885763287f03a5fb348ba27715e049bb48f8
From 62afbc513a4730c3352ffcee9f5cb9e1336c83e3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Wed, 19 Feb 2020 17:21:16 -0800
Subject: [PATCH] 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:[email-masked].
---
 src/fileio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fileio.c b/src/fileio.c
index 34934dd6df..482f88627a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2911,7 +2911,7 @@ DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0,
   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.
-- 
2.24.1