]> code.delx.au - gnu-emacs/commitdiff
(Fexpand_file_name): Fix confusion in detecting
authorRichard M. Stallman <rms@gnu.org>
Tue, 27 Feb 1996 16:51:25 +0000 (16:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 27 Feb 1996 16:51:25 +0000 (16:51 +0000)
that default_directory is already absolute so need not be expanded.

src/fileio.c

index 5ea29061950dfd566b2ff18c083bba3e24142520..221ef67cd8e2500d45b6c567a3ac2235ac856880 100644 (file)
@@ -795,10 +795,15 @@ See also the function `substitute-in-file-name'.")
 
      The EQ test avoids infinite recursion.  */
   if (! NILP (default_directory) && !EQ (default_directory, name)
-      /* This saves time in a common case.  */
+      /* Save time in some common cases.  */
+#ifdef DOS_NT
+      /* Detect MSDOS file names with device names.  */
       && ! (XSTRING (default_directory)->size >= 3
-           && IS_DIRECTORY_SEP (XSTRING (default_directory)->data[0])
-           && IS_DEVICE_SEP (XSTRING (default_directory)->data[1])))
+           && IS_DEVICE_SEP (o[1]) && IS_DIRECTORY_SEP (o[2]))
+#endif
+      /* Detect Unix absolute file names.  */
+      && ! (XSTRING (default_directory)->size >= 2
+           && IS_DIRECTORY_SEP (o[0])))
     {
       struct gcpro gcpro1;