Subject: bug#21087: 24.5; ff-find-other-file will create a file with an extra trailling backslash

From: Eli Zaretskii <[email-masked]>
Date: Sat, 18 Jul 2015 20:40:52 +0300

> Date: Sat, 18 Jul 2015 23:47:15 +0800 (CST)
> From: ".." <[email-masked]>
> 
> It jumps out that ff-find-other-file will create the expecting file name with
> an extra
> trailling backslash, which makes the the newly opened buffer as directory.
> This happens after I updated all the 3rd party packages to the
> latest version. Although I havn't found out which package caused this
> issue, but the following patch will fix it, and I think it makes
> more sense to use read-file-name than read-directory-name
> 
> --- emacs\share\emacs\24.5\lisp\find-file.el
> +++ emacs\share\emacs\24.5\lisp\find-file.el
> @@ -495,7 +495,7 @@
> (setq name
> (expand-file-name
> - (read-directory-name
> + (read-file-name
> (format "Find or create %s in: " default-name)
> default-directory default-name nil)))

But that question is about the directory in which to create a file, so
read-directory-name sounds about right to me.