* 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,17 +744,20 @@ do_pathconv (char *filename)
buf = get_short_name (buf);
if (longname_flag)
buf = get_long_name (buf, len);
if (strncmp (buf, "\\\\?\\", 4) == 0)
{
len = 4;
if (strncmp (buf + 4, "UNC\\", 4) == 0)
len = 6;
if (strlen (buf) < MAX_PATH + len)
{
buf += len;
if (len == 6)
*buf = '\\';
}
}
if (mixed_flag)
buf = get_mixed_name (buf);
len = 4;
if (strncmp (buf, "\\\\?\\UNC\\", 8) == 0)
len = 6;
if (strlen (buf) < MAX_PATH + len)
{
buf += len;
if (len == 6)
*buf = '\\';
}
}
}