Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 7f57e21

Browse files
committed
fix: use unixPath for matching windows paths to configuration paths
1 parent d047d67 commit 7f57e21

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/project-manager.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ export class ProjectConfiguration {
405405
*/
406406
public isExpectedDeclarationFile(fileName: string): boolean {
407407
return isDeclarationFile(fileName) &&
408-
(this.expectedFilePaths.has(toUnixPath(fileName)) ||
408+
(this.expectedFilePaths.has(fileName) ||
409409
this.typeRoots.some(root => fileName.startsWith(root)))
410410
}
411411

@@ -427,8 +427,9 @@ export class ProjectConfiguration {
427427
// Add all global declaration files from the workspace and all declarations from the project
428428
for (const uri of this.fs.uris()) {
429429
const fileName = uri2path(uri)
430-
if (isGlobalTSFile(fileName) ||
431-
this.isExpectedDeclarationFile(fileName)) {
430+
const unixPath = toUnixPath(fileName)
431+
if (isGlobalTSFile(unixPath) ||
432+
this.isExpectedDeclarationFile(unixPath)) {
432433
const sourceFile = program.getSourceFile(fileName)
433434
if (!sourceFile) {
434435
this.getHost().addFile(fileName)

0 commit comments

Comments
 (0)