mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Add check for no match into fs watch rename event handler (#42651)
This commit is contained in:
parent
ab2729a99b
commit
be18057792
@ -1560,7 +1560,7 @@ namespace ts {
|
||||
return event === "rename" &&
|
||||
(!relativeName ||
|
||||
relativeName === lastDirectoryPart ||
|
||||
relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator!) === relativeName.length - lastDirectoryPartWithDirectorySeparator!.length) &&
|
||||
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator!) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator!) === relativeName.length - lastDirectoryPartWithDirectorySeparator!.length)) &&
|
||||
!fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
||||
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
||||
callback(event, relativeName);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user