Commit 9172b88d authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(Fread_file_name): Handle case that DIR contains a

file name.
parent d21cf544
No preview for this file type
......@@ -5596,6 +5596,15 @@ DIR defaults to current buffer's directory default.")
&& use_dialog_box
&& have_menus_p ())
{
/* If DIR contains a file name, split it. */
Lisp_Object file;
file = Ffile_name_nondirectory (dir);
if (XSTRING (file)->size && NILP (default_filename))
{
default_filename = file;
dir = Ffile_name_directory (dir);
}
default_filename = Fexpand_file_name (default_filename, dir);
val = Fx_file_dialog (prompt, dir, default_filename, mustmatch);
add_to_history = 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment