Skip to content

Commit 081aab7

Browse files
committed
Clarify comment on locale compare
1 parent 7440e0d commit 081aab7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/ql-vscode/src/run-queries.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ async function convertToQlPath(filePath: string): Promise<string> {
226226
const fileName = path.basename(filePath);
227227
const fileNames = await promisify<string, string[]>(fs.readdir)(dir);
228228
for (const name of fileNames) {
229-
// leave the locale argument empty so that the default OS locale is used.
229+
// Leave the locale argument empty so that the default OS locale is used.
230+
// We do this because this operation works on filesystem entities, which
231+
// use the os locale, regardless of the locale of the running VS Code instance.
230232
if (fileName.localeCompare(name, undefined, { sensitivity: 'accent' }) === 0) {
231233
return path.join(dir, name);
232234
}

0 commit comments

Comments
 (0)