Mercurial > emacs
diff src/fileio.c @ 17503:ba848dceb1c9
(Fexpand_file_name): Fix expansion of "/foo/../".
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 18 Apr 1997 02:47:40 +0000 |
| parents | 7fbce3c83857 |
| children | 648beff801bb |
line wrap: on
line diff
--- a/src/fileio.c Fri Apr 18 00:48:01 1997 +0000 +++ b/src/fileio.c Fri Apr 18 02:47:40 1997 +0000 @@ -1379,7 +1379,8 @@ { 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; }
