From: Richard M. Stallman Date: Sat, 22 May 2004 22:17:17 +0000 (+0000) Subject: (Fread_file_name): Expand DIR if not absolute. X-Git-Tag: ttn-vms-21-2-B4~6093 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abd5b7f2f035085b56f31baa02796701c53d0401;p=emacs.git (Fread_file_name): Expand DIR if not absolute. --- 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");