Skip to content

Add check for no match into fs watch rename event handler#42651

Merged
weswigham merged 1 commit intomicrosoft:masterfrom
weswigham:add-check-for-no-match
Feb 4, 2021
Merged

Add check for no match into fs watch rename event handler#42651
weswigham merged 1 commit intomicrosoft:masterfrom
weswigham:add-check-for-no-match

Conversation

@weswigham
Copy link
Copy Markdown
Member

Fixes a codeQL smell. This codepath is impossible (?) for us to test, since it's in a handler passed to the native node fs.watch call, using variables only set on linux/osx, however I think it's self-evident the check should exist to handle if, eg, lastDirectoryPartWithDirectorySeparator is /foo/bar/ and relativeName is eight.ts (so relativeName is exactly one character shorter than lastDirectoryPartWithDirectorySeparator but has no parts in common).

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 4, 2021
@weswigham weswigham merged commit be18057 into microsoft:master Feb 4, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants