From fd5f6eb13e2a058f9cc840e44e64d420fce7dc58 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 31 Jul 2013 10:26:51 +0000 Subject: * path.cc (normalize_posix_path): Don't check existence of / or // dir in parent dir check. --- winsup/cygwin/path.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 7f0e5b81f..8acb6ff6b 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -311,11 +311,14 @@ normalize_posix_path (const char *src, char *dst, char *&tail) double check in case of foo/bar/../.. */ if (check_parent) { - *tail = 0; - debug_printf ("checking %s before '..'", dst); - path_conv head (dst); - if (!head.isdir()) - return ENOENT; + if (tail > dst_start) /* Don't check for / or // dir. */ + { + *tail = 0; + debug_printf ("checking %s before '..'", dst); + path_conv head (dst); + if (!head.isdir()) + return ENOENT; + } check_parent = false; } while (tail > dst_start && !isslash (*--tail)) -- cgit v1.2.3