changeset 14697:5a7714d4748e

(Fexpand_file_name): Fix confusion in detecting that default_directory is already absolute so need not be expanded.
author Richard M. Stallman <rms@gnu.org>
date Tue, 27 Feb 1996 16:51:25 +0000
parents d6d9e31c11f4
children 87d459e75dad
files src/fileio.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Tue Feb 27 16:32:05 1996 +0000
+++ b/src/fileio.c	Tue Feb 27 16:51:25 1996 +0000
@@ -795,10 +795,15 @@
 
      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;