From: Corinna Vinschen Date: Mon, 22 Feb 2010 17:40:46 +0000 (+0000) Subject: * cygpath.cc (do_pathconv): Fix erroneously printing native NT path X-Git-Tag: cygwin-1_7_2-release~69 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=80206d7f71225766539e72bb31256bbc5618bd65;p=newlib-cygwin.git * cygpath.cc (do_pathconv): Fix erroneously printing native NT path prefix introduced by previous patch. --- diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 42da428ae..95a0af791 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2010-02-22 Corinna Vinschen + + * cygpath.cc (do_pathconv): Fix erroneously printing native NT path + prefix introduced by previous patch. + 2010-02-22 Corinna Vinschen * locale.cc (lc_time_names): Add "date_fmt" entry. diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index 4dbdaeff0..2ba727a9c 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -687,6 +687,7 @@ do_pathconv (char *filename) wchar_t *buf2 = NULL; DWORD len; ssize_t err; + bool print_tmp = false; cygwin_conv_path_t conv_func = (unix_flag ? CCP_WIN_A_TO_POSIX : (path_flag ? CCP_POSIX_TO_WIN_A @@ -783,6 +784,7 @@ do_pathconv (char *filename) tmp += len; if (len == 6) *tmp = '\\'; + print_tmp = true; } } if (mixed_flag) @@ -790,7 +792,7 @@ do_pathconv (char *filename) } } - puts (buf); + puts (print_tmp ? tmp : buf); if (buf2) free (buf2); if (buf)