From: Richard M. Stallman Date: Fri, 18 Apr 1997 02:47:40 +0000 (+0000) Subject: (Fexpand_file_name): Fix expansion of "/foo/../". X-Git-Tag: emacs-20.1~2442 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=795de72081d1cec5a763ef86d5ff072b565b86e9;p=emacs.git (Fexpand_file_name): Fix expansion of "/foo/../". --- diff --git a/src/fileio.c b/src/fileio.c index 3be84dcb52f..abb142175d5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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; }