aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2006-01-10 17:46:41 +0000
committerStefan Monnier2006-01-10 17:46:41 +0000
commitb8f7f3be80c182ea4b6f112eb1e1193ed78233eb (patch)
tree666b16988c9f0618d6157b20bb5b7a63185055c0 /src
parent0c91399adf347632b904936403b07f23206db27f (diff)
downloademacs-b8f7f3be80c182ea4b6f112eb1e1193ed78233eb.tar.gz
emacs-b8f7f3be80c182ea4b6f112eb1e1193ed78233eb.zip
(Fexpand_file_name): Remove redundant tests. Fix elimination of // so that
it doesn't prevent elimination of an immediately following /. or /..
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/fileio.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 89576a60718..e722bf78945 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12006-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * fileio.c (Fexpand_file_name): Remove redundant tests.
4 Fix elimination of // so that it doesn't prevent elimination of an
5 immediately following /. or /..
6
12006-01-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 72006-01-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 8
3 * gtkutil.c (xg_toggle_notify_cb): New function. 9 * gtkutil.c (xg_toggle_notify_cb): New function.
diff --git a/src/fileio.c b/src/fileio.c
index fb56c62b78a..66546b3b556 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,7 +1,7 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996,
3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005 Free Software Foundation, Inc. 4 2005, 2006 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -1644,8 +1644,7 @@ See also the function `substitute-in-file-name'. */)
1644 { 1644 {
1645 *o++ = *p++; 1645 *o++ = *p++;
1646 } 1646 }
1647 else if (IS_DIRECTORY_SEP (p[0]) 1647 else if (p[1] == '.'
1648 && p[1] == '.'
1649 && (IS_DIRECTORY_SEP (p[2]) 1648 && (IS_DIRECTORY_SEP (p[2])
1650 || p[2] == 0)) 1649 || p[2] == 0))
1651 { 1650 {
@@ -1655,7 +1654,7 @@ See also the function `substitute-in-file-name'. */)
1655 *o++ = *p; 1654 *o++ = *p;
1656 p += 2; 1655 p += 2;
1657 } 1656 }
1658 else if (IS_DIRECTORY_SEP (p[0]) && p[1] == '.' && p[2] == '.' 1657 else if (p[1] == '.' && p[2] == '.'
1659 /* `/../' is the "superroot" on certain file systems. 1658 /* `/../' is the "superroot" on certain file systems.
1660 Turned off on DOS_NT systems because they have no 1659 Turned off on DOS_NT systems because they have no
1661 "superroot" and because this causes us to produce 1660 "superroot" and because this causes us to produce
@@ -1675,14 +1674,9 @@ See also the function `substitute-in-file-name'. */)
1675 ++o; 1674 ++o;
1676 p += 3; 1675 p += 3;
1677 } 1676 }
1678 else if (p > target 1677 else if (p > target && IS_DIRECTORY_SEP (p[1]))
1679 && IS_DIRECTORY_SEP (p[0]) && IS_DIRECTORY_SEP (p[1])) 1678 /* Collapse multiple `/' in a row. */
1680 { 1679 p++;
1681 /* Collapse multiple `/' in a row. */
1682 *o++ = *p++;
1683 while (IS_DIRECTORY_SEP (*p))
1684 ++p;
1685 }
1686 else 1680 else
1687 { 1681 {
1688 *o++ = *p++; 1682 *o++ = *p++;