Skip to content

Commit

Permalink
Fix typo in canWatchDirectoryOrFile found by CodeQL (#51262)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Oct 21, 2022
1 parent a56b254 commit bbb42f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/resolutionCache.ts
Expand Up @@ -127,7 +127,7 @@ namespace ts {
const isNonDirectorySeparatorRoot = rootLength > 1 || dirPath.charCodeAt(0) !== CharacterCodes.slash;
if (isNonDirectorySeparatorRoot &&
dirPath.search(/[a-zA-Z]:/) !== 0 && // Non dos style paths
pathPartForUserCheck.search(/[a-zA-z]\$\//) === 0) { // Dos style nextPart
pathPartForUserCheck.search(/[a-zA-Z]\$\//) === 0) { // Dos style nextPart
nextDirectorySeparator = dirPath.indexOf(directorySeparator, nextDirectorySeparator + 1);
if (nextDirectorySeparator === -1) {
// ignore "//vda1cs4850/c$/folderAtRoot"
Expand Down

0 comments on commit bbb42f4

Please sign in to comment.