[KERNEL32]

Daniel Zimmerman: Update GetShortPathNameW to Wine
See issue #4553 for more details.

svn path=/trunk/; revision=46850
This commit is contained in:
Gregor Schneider 2010-04-12 19:43:07 +00:00
parent 8b6a58978f
commit c85b9b7fad

View file

@ -741,7 +741,7 @@ GetShortPathNameW (
} }
/* check for drive letter */ /* check for drive letter */
if (longpath[1] == ':' ) if (longpath[0] != '/' && longpath[1] == ':' )
{ {
tmpshortpath[0] = longpath[0]; tmpshortpath[0] = longpath[0];
tmpshortpath[1] = ':'; tmpshortpath[1] = ':';
@ -772,7 +772,7 @@ GetShortPathNameW (
tmplen = p - (longpath + lp); tmplen = p - (longpath + lp);
lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1); lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
/* Check, if the current element is a valid dos name */ /* Check, if the current element is a valid dos name */
if (tmplen <= 8+1+3+1) if (tmplen <= 8+1+3)
{ {
BOOLEAN spaces; BOOLEAN spaces;
memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR)); memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));