[PATCH v2 2/7] kernel32: Advance over the input buffer when stripping ./
Jeremy White
jwhite at codeweavers.com
Mon Dec 21 15:20:08 CST 2015
This is the same fix for GetLongPathName that was contained in a fix for
GetShortPathName in commit 9178d037d71e823f5d5eaa5008a3cdd574377bac.
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
dlls/kernel32/path.c | 1 +
dlls/kernel32/tests/path.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index ff94227..ec14b35 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -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);
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index e90a260..4504603 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -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);
--
2.1.4
More information about the wine-patches
mailing list