diff options
author | Eli Zaretskii <[email protected]> | 2005-05-21 15:28:57 +0000 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2005-05-21 15:28:57 +0000 |
commit | aa4060b96fc558a2861712ddb051a22c1adef275 (patch) | |
tree | f79546ba922ab7bed362b157a92f8868052e51b5 /src/fileio.c | |
parent | bb4afd09189d16c86792843c97309820d3a5a688 (diff) |
(Fexpand_file_name) [DOS_NT]: Don't try to support "superroot"
on DOS_NT systems.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 0956fb9d13..4dac185ac8 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1651,8 +1651,16 @@ See also the function `substitute-in-file-name'. */) 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)) |