From 795de72081d1cec5a763ef86d5ff072b565b86e9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 18 Apr 1997 02:47:40 +0000 Subject: [PATCH] (Fexpand_file_name): Fix expansion of "/foo/../". --- src/fileio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5