Akihiro Sagawa (@sgwaki) commented about dlls/kernel32/tests/path.c:
length = GetLongPathNameW(shortpath, NULL, 0); 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());
This condition is inconsistent with line 1333, where the same check is written as `length`. It's also acceptable to update line 1333 to match the expression used here. You should use `%lu` instead of `%ld` for `GetLastError()` since it is `DWORD (unsigned long)`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10192#note_134939