* cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really

given.  Do backslash to slash conversion for mixed paths after
	handling \\?\ prefix.
This commit is contained in:
Corinna Vinschen 2009-04-15 10:00:40 +00:00
parent ca027229d5
commit 8c3a79bb97
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2009-04-15 Corinna Vinschen <corinna@vinschen.de>
* cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really
given. Do backslash to slash conversion for mixed paths after
handling \\?\ prefix.
2009-04-13 Dave Korn <dave.korn.cygwin@gmail.com>
* Makefile.in (dumper.exe): Add -lz to ALL_LDFLAGS.

View File

@ -744,10 +744,10 @@ do_pathconv (char *filename)
buf = get_short_name (buf);
if (longname_flag)
buf = get_long_name (buf, len);
if (mixed_flag)
buf = get_mixed_name (buf);
if (strncmp (buf, "\\\\?\\", 4) == 0)
{
len = 4;
if (strncmp (buf, "\\\\?\\UNC\\", 8) == 0)
if (strncmp (buf + 4, "UNC\\", 4) == 0)
len = 6;
if (strlen (buf) < MAX_PATH + len)
{
@ -756,6 +756,9 @@ do_pathconv (char *filename)
*buf = '\\';
}
}
if (mixed_flag)
buf = get_mixed_name (buf);
}
}
puts (buf);