From abd5b7f2f035085b56f31baa02796701c53d0401 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 22 May 2004 22:17:17 +0000 Subject: [PATCH] (Fread_file_name): Expand DIR if not absolute. --- src/fileio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 8696946eb8a..5c073433c75 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6198,10 +6198,13 @@ provides a file dialog box. */) if (NILP (dir)) dir = current_buffer->directory; + if (NILP (Ffile_name_absolute_p (dir))) + dir = Fexpand_file_name (dir, Qnil); if (NILP (default_filename)) - default_filename = !NILP (initial) - ? Fexpand_file_name (initial, dir) - : current_buffer->filename; + default_filename + = (!NILP (initial) + ? Fexpand_file_name (initial, dir) + : current_buffer->filename); /* If dir starts with user's homedir, change that to ~. */ homedir = (char *) egetenv ("HOME"); -- 2.39.5