Skip to content

Commit a0e327b

Browse files
authored
Merge pull request #4359 from github/copilot/fix-unit-test-errors-koffy-upgrade
Fix off-by-one in expandShortPathNative truncating last path character on Windows
2 parents 375738c + 4573af4 commit a0e327b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/ql-vscode/src/common/short-paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ async function expandShortPathNative(shortPath: string, logger: BaseLogger) {
170170
throw new Error("Failed to get long path name");
171171
}
172172

173-
const longPath = buffer.toString("utf16le", 0, (result - 1) * 2);
173+
const longPath = buffer.toString("utf16le", 0, result * 2);
174174

175175
void logger.log(`Expanded short path ${shortPath} to ${longPath}`);
176176

0 commit comments

Comments
 (0)