Mercurial > emacs
changeset 62589:12b3cd6b8467
(Fexpand_file_name) [DOS_NT]: Don't try to support "superroot"
on DOS_NT systems.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 21 May 2005 15:28:13 +0000 |
parents | bf515cb14f37 |
children | d69749807420 |
files | src/fileio.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Sat May 21 14:14:05 2005 +0000 +++ b/src/fileio.c Sat May 21 15:28:13 2005 +0000 @@ -1651,8 +1651,16 @@ 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))