Skip to content

Commit ba70c53

Browse files
committed
Pass absolute path to directoryExists
As pointed out by @gretzkiy, the `directoryExists` call added to `matchFiles` in #44710 should have been passing the absolute path (since the current directory might not match `currentDirectory`).
1 parent 26aef89 commit ba70c53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/utilities.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6634,8 +6634,9 @@ namespace ts {
66346634
const visited = new Map<string, true>();
66356635
const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
66366636
for (const basePath of patterns.basePaths) {
6637-
if (directoryExists(basePath)) {
6638-
visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
6637+
const absoluteBasePath = combinePaths(currentDirectory, basePath);
6638+
if (directoryExists(absoluteBasePath)) {
6639+
visitDirectory(basePath, absoluteBasePath, depth);
66396640
}
66406641
}
66416642

0 commit comments

Comments
 (0)