Merge pull request #22496 from Microsoft/suppressMultipleDelete

Do not send delete event every poll for missing folder
This commit is contained in:
Sheetal Nandi 2018-03-13 11:11:51 -07:00 committed by GitHub
commit 32018f66bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -747,6 +747,10 @@ namespace ts {
function fileChanged(curr: any, prev: any) {
if (+curr.mtime === 0) {
if (eventKind === FileWatcherEventKind.Deleted) {
// Already deleted file, no need to callback again
return;
}
eventKind = FileWatcherEventKind.Deleted;
}
// previous event kind check is to ensure we send created event when file is restored or renamed twice (that is it disappears and reappears)