diff --git a/packages/file-service/src/node/hosted/recursive/file-service-watcher.ts b/packages/file-service/src/node/hosted/recursive/file-service-watcher.ts index eb9f62d040..2bb8eec8b3 100644 --- a/packages/file-service/src/node/hosted/recursive/file-service-watcher.ts +++ b/packages/file-service/src/node/hosted/recursive/file-service-watcher.ts @@ -101,7 +101,9 @@ export class RecursiveFileSystemWatcher extends Disposable implements IWatcher { private async doWatchFileChange(uri: string, options?: WatchOptions) { if (this.WATCHER_HANDLERS.has(uri)) { - return; + const handler = this.WATCHER_HANDLERS.get(uri); + handler?.disposable.dispose(); + this.WATCHER_HANDLERS.delete(uri); } const basePath = FileUri.fsPath(uri);