We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c000e8 commit 5cdbe77Copy full SHA for 5cdbe77
src/compiler/sys.ts
@@ -316,10 +316,9 @@ namespace ts {
316
if (platform === "win32" || platform === "win64") {
317
return false;
318
}
319
-
320
- const upperCaseFilename = _path.basename(__filename).toUpperCase();
321
322
- return !fileExists(_path.join(_path.dirname(__filename), upperCaseFilename));
+ // convert current file name to upper case / lower case and check if file exists
+ // (guards against cases when name is already all uppercase or lowercase)
+ return !fileExists(__filename.toUpperCase()) || !fileExists(__filename.toLowerCase());
323
324
325
const platform: string = _os.platform();
0 commit comments