Commit 440030b9 authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

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 9178d037. Signed-off-by: 's avatarJeremy White <jwhite@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 81ccc7b8
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment