kernel32: Fix a crash with GetLongPathNameW and UNC path names.

This commit is contained in:
Paul Vriens 2009-12-17 10:44:05 +01:00 committed by Alexandre Julliard
parent b4b7724a79
commit d58bd680b1
1 changed files with 9 additions and 3 deletions

View File

@ -313,9 +313,15 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
if (shortpath[0] == '\\' && shortpath[1] == '\\')
{
ERR("UNC pathname %s\n", debugstr_w(shortpath));
lstrcpynW( longpath, shortpath, longlen );
return strlenW(longpath);
FIXME("UNC pathname %s\n", debugstr_w(shortpath));
tmplen = strlenW(shortpath);
if (tmplen < longlen)
{
if (longpath != shortpath) strcpyW( longpath, shortpath );
return tmplen;
}
return tmplen + 1;
}
unixabsolute = (shortpath[0] == '/');