]> code.delx.au - gnu-emacs/commitdiff
(Fexpand_file_name): Fix expansion of "/foo/../".
authorRichard M. Stallman <rms@gnu.org>
Fri, 18 Apr 1997 02:47:40 +0000 (02:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 18 Apr 1997 02:47:40 +0000 (02:47 +0000)
src/fileio.c

index 3be84dcb52f781c3b4da63e62ba3eb045abf3bc6..abb142175d596c269c132435146fc0fa786cb68f 100644 (file)
@@ -1379,7 +1379,8 @@ See also the function `substitute-in-file-name'.")
        {
          while (o != target && (--o) && !IS_DIRECTORY_SEP (*o))
            ;
-         if (o == target && IS_ANY_SEP (*o))
+         /* Keep initial / only if this is the whole name.  */
+         if (o == target && IS_ANY_SEP (*o) && p[3] == 0)
            ++o;
          p += 3;
        }