guard against cases when current file name is already in uppercase
This commit is contained in:
parent
0c000e831d
commit
5cdbe773c6
1 changed files with 3 additions and 4 deletions
|
@ -316,10 +316,9 @@ namespace ts {
|
|||
if (platform === "win32" || platform === "win64") {
|
||||
return false;
|
||||
}
|
||||
|
||||
const upperCaseFilename = _path.basename(__filename).toUpperCase();
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
const platform: string = _os.platform();
|
||||
|
|
Loading…
Reference in a new issue