aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-02-15 10:39:36 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-02-15 10:39:36 +0000
commitec584208706a1b1006476c5f56ab21ed100bd2f8 (patch)
treee32084f4b5eb196386edd25ddfe9966fcdbea3ba
parent2908e3eb8093cbd3903316a307745d99c42ff250 (diff)
downloadnewlib-ec584208706a1b1006476c5f56ab21ed100bd2f8.zip
newlib-ec584208706a1b1006476c5f56ab21ed100bd2f8.tar.gz
newlib-ec584208706a1b1006476c5f56ab21ed100bd2f8.tar.bz2
Revert change from 2010-08-31:
* path.cc (normalize_posix_path): Drop support for //./ and //?/ prefixes. (path_conv::check): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/path.cc15
2 files changed, 7 insertions, 15 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c34b9ec..35b1c9d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2011-02-15 Corinna Vinschen <corinna@vinschen.de>
+ Revert change from 2010-08-31:
+ * path.cc (normalize_posix_path): Drop support for //./ and //?/
+ prefixes.
+ (path_conv::check): Ditto.
+
+2011-02-15 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
path to check for symlink.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a1f36b7..e1371d3 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -266,14 +266,6 @@ normalize_posix_path (const char *src, char *dst, char *&tail)
{
*tail++ = *src++;
++dst_start;
- /* Is that a //?/ or //./ prefix into the native NT namespace?
- If so, preserve it. */
- if ((src[1] == '.' || src[1] == '?') && isslash (src[2]))
- {
- *tail++ = *src++;
- *tail++ = *src++;
- dst_start += 2;
- }
}
while (*src)
@@ -843,13 +835,6 @@ path_conv::check (const char *src, unsigned opt,
full_path[2] = '\\';
full_path[3] = '\0';
}
- /* Otherwise, if the user requires a directory and explicitely
- specified a path into the native NT namespace, add the trailing
- backslash. It's needed to access the root dir. */
- else if (need_directory
- && full_path[0] == '\\' && full_path[1] == '\\'
- && (full_path[2] == '.' || full_path[2] == '?'))
- strcat (full_path, "\\");
/* If the incoming path was given in DOS notation, always treat
it as caseinsensitive,noacl path. This must be set before