From c463c172e324932e73ea13de52d5dc340e5e0f4b Mon Sep 17 00:00:00 2001 From: liuqian Date: Mon, 13 Jan 2025 10:46:29 +0800 Subject: [PATCH] fix: test case --- .../src/node/hosted/recursive/file-service-watcher.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);