kernel32: Advance over the input buffer when stripping ./.

This is the same fix for GetLongPathName that was contained in a fix for
GetShortPathName in commit 9178d037d7.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeremy White 2015-12-21 15:20:08 -06:00 committed by Alexandre Julliard
parent 81ccc7b816
commit 440030b938
2 changed files with 1 additions and 2 deletions

View File

@ -349,6 +349,7 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
{
tmplongpath[lp++] = *p++;
tmplongpath[lp++] = *p++;
sp += 2;
}
for (; *p && *p != '/' && *p != '\\'; p++);
tmplen = p - (shortpath + sp);

View File

@ -2138,9 +2138,7 @@ static void test_relative_path(void)
strcpy(buf, "deadbeef");
ret = pGetLongPathNameA(".\\..\\foo\\file", buf, MAX_PATH);
todo_wine
ok(ret, "GetLongPathName error %d\n", GetLastError());
todo_wine
ok(!strcmp(buf, ".\\..\\foo\\file"), "expected .\\..\\foo\\file, got %s\n", buf);
strcpy(buf, "deadbeef");
ret = GetShortPathNameA(".\\..\\foo\\file", buf, MAX_PATH);