]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fexpand_file_name) [DOS_NT]: Don't try to support "superroot"
authorEli Zaretskii <eliz@gnu.org>
Sat, 21 May 2005 15:28:57 +0000 (15:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 May 2005 15:28:57 +0000 (15:28 +0000)
on DOS_NT systems.

src/ChangeLog
src/fileio.c

index 66dc04064433281562c92d5a8d7779c4a67e5902..dc47422150326b8b0e7ac1c66f62b8a92dc5184e 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * fileio.c (Fexpand_file_name) [DOS_NT]: Don't try to support
+       "superroot" on DOS_NT systems.
+
 2005-05-21  David Hunter  <hunterd42@comcast.net>  (tiny change)
 
        * process.c (send_process): Restore the SIGPIPE handler if we
index 0956fb9d13450a50f64a9fad7e33aa341474877b..4dac185ac81d563109c6d6cf27dca7b5f8d6768f 100644 (file)
@@ -1651,8 +1651,16 @@ See also the function `substitute-in-file-name'.  */)
          p += 2;
        }
       else if (IS_DIRECTORY_SEP (p[0]) && p[1] == '.' && p[2] == '.'
-              /* `/../' is the "superroot" on certain file systems.  */
+              /* `/../' is the "superroot" on certain file systems.
+                 Turned off on DOS_NT systems because they have no
+                 "superroot" and because this causes us to produce
+                 file names like "d:/../foo" which fail file-related
+                 functions of the underlying OS.  (To reproduce, try a
+                 long series of "../../" in default_directory, longer
+                 than the number of levels from the root.)  */
+#ifndef DOS_NT
               && o != target
+#endif
               && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0))
        {
          while (o != target && (--o) && !IS_DIRECTORY_SEP (*o))