OSDN Git Service

* cygpath.cc (do_pathconv): Fix erroneously printing native NT path
authorcorinna <corinna>
Tue, 23 Feb 2010 02:40:46 +0000 (02:40 +0000)
committercorinna <corinna>
Tue, 23 Feb 2010 02:40:46 +0000 (02:40 +0000)
prefix introduced by previous patch.

winsup/utils/ChangeLog
winsup/utils/cygpath.cc

index 42da428..95a0af7 100644 (file)
@@ -1,5 +1,10 @@
 2010-02-22  Corinna Vinschen  <corinna@vinschen.de>
 
+       * cygpath.cc (do_pathconv): Fix erroneously printing native NT path
+       prefix introduced by previous patch.
+
+2010-02-22  Corinna Vinschen  <corinna@vinschen.de>
+
        * locale.cc (lc_time_names): Add "date_fmt" entry.
 
 2010-02-19  Christopher Faylor  <me+cygwin@cgf.cx>
index 1127bdb..1420618 100644 (file)
@@ -29,7 +29,7 @@ details. */
 #include <ddk/ntifs.h>
 #include "wide_path.h"
 
-static const char version[] = "$Revision: 1.60 $";
+static const char version[] = "$Revision: 1.61 $";
 
 static char *prog_name;
 static char *file_arg, *output_arg;
@@ -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)