From 88c5e2295baa1e2c10c27c5da30295e3aeede377 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 12 Mar 2018 13:52:15 -0700 Subject: [PATCH] Do not send delete event every poll for missing folder Fixes #22494 --- src/compiler/sys.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 4f62cfdfe2d91..12a1b09af546c 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -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)