Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit bab8650

Browse files
committed
Parser: fixed another Windows path issue
1 parent e26e59b commit bab8650

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/parser.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,13 @@ class TS2ASParser
131131
}
132132
this._sourceFiles.forEach((sourceFile, index) =>
133133
{
134+
//the fileName property of ts.SourceFile may not account for
135+
//platform path differences, so use path.resolve to normalize
136+
let sourceFileName = path.resolve(sourceFile.fileName);
134137
this._currentFileIsExternal = !fileNames.some((fileName) =>
135138
{
136139
fileName = path.resolve(fileName);
137-
return fileName === sourceFile.fileName;
140+
return fileName === sourceFileName;
138141
});
139142
this.readSourceFile(sourceFile);
140143
});

0 commit comments

Comments
 (0)