diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index e9463bb60eb..7618dc9e33d 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -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] == '/');