]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fread_file_name): Expand DIR if not absolute.
authorRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:17:17 +0000 (22:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:17:17 +0000 (22:17 +0000)
src/fileio.c

index 8696946eb8af5233723ee4edd821d6780a41cb97..5c073433c759fbc192cc25fca82c0553969d7b53 100644 (file)
@@ -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");