Re: [PATCH v46 0/1] MR10192: kernelbase: Handle extended length path prefix in GetLongPathNameW
Akihiro Sagawa (@sgwaki) commented about dlls/kernel32/tests/path.c:
ok(length == expanded, "Expected %ld, got %ld\n", expanded, length);
+ /* Test that extended prefix is preserved in output when converting from + * short to long path */ + shortpath2[0] = 0; + length = GetShortPathNameW(dirpath, shortpath2, ARRAY_SIZE(shortpath2)); + ok(length, "GetShortPathNameW failed: %lu\n", GetLastError()); + ok(lstrcmpiW(dirpath, shortpath2) != 0, + "short path name isn't created, got %s\n", debugstr_w(shortpath2)); + SetLastError(0xdeadbeef); + length = GetLongPathNameW(shortpath2, longpath, ARRAY_SIZE(longpath)); + trace("longpath: %s\n", wine_dbgstr_w(longpath)); // to be removed + ok(length > 0, "GetLongPathNameW failed: %ld\n", GetLastError()); + ok(!wcsncmp(longpath, dirpath, lstrlenW(dirpath)), + "Expected path: %s, got: %s\n", wine_dbgstr_w(dirpath), + wine_dbgstr_w(longpath));
Using `lstrcmpiW` seems more appropriate than `wcsncmp` in this context. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10192#note_134937
participants (1)
-
Akihiro Sagawa (@sgwaki)