summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-05-22 22:17:17 +0000
committerRichard M. Stallman <rms@gnu.org>2004-05-22 22:17:17 +0000
commitabd5b7f2f035085b56f31baa02796701c53d0401 (patch)
tree7d62f5c85c3eb2c2566240348aa4062b6646cd10 /src/fileio.c
parent017e09acc2ba852fdbad4d601d715362c81a372a (diff)
(Fread_file_name): Expand DIR if not absolute.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c9
1 files 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");