Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: normalize_posix_path can't take root access into account yet. Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 21 Apr 2000 11:46:02 +0900 Message-ID: Lines: 24 X-Mailer: Gnus v5.3/Emacs 19.34 normalize_posix_path can't take root access into account yet. The following patch can fix it. ChangeLog: Fri Apr 21 11:29:43 2000 Kazuhiro Fujieda * path.cc (normalize_posix_path): Previous change failed to take root access into account, too. --- path.cc-1.12 Fri Apr 21 11:43:53 2000 +++ path.cc Fri Apr 21 11:29:43 2000 @@ -620,7 +620,7 @@ normalize_posix_path (const char *cwd, c } } if (dst > (dst_start + 1) && dst[-1] == '.' && SLASH_P (dst[-2])) - dst -= dst[2] ? 2 : 1; + dst -= (dst > dst_start + 2) ? 2 : 1; *dst = 0; debug_printf ("%s = normalize_posix_path (%s)", dst_start, src_start); return 0; ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology