Skip to content

Commit 532c1b0

Browse files
committed
Casts paths to lowercase to prevent inconsistency on macOS
1 parent 514bf16 commit 532c1b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/pyright-internal/src/analyzer/importResolver.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,13 @@ export class ImportResolver {
12841284
filePath: string,
12851285
stripTopContainerDir = false
12861286
): ModuleNameInfoFromPath | undefined {
1287+
/**
1288+
* TODO(https://github.com/sourcegraph/scip-python/issues/91)
1289+
* Both paths are casted to lowercase to make the comparison case-insensitive. This has been fixed upstream and should be removed on merge.
1290+
*/
1291+
containerPath = containerPath.toLowerCase();
1292+
filePath = filePath.toLowerCase();
1293+
12871294
containerPath = ensureTrailingDirectorySeparator(containerPath);
12881295
let filePathWithoutExtension = stripFileExtension(filePath);
12891296

0 commit comments

Comments
 (0)