Skip to content

Commit e69b74e

Browse files
Copilotgcampbell-msfthanniavalera
authored
Fix file watcher exhaustion by disabling symlink following (#4625)
* Initial plan * Fix file watcher exhaustion by adding followSymlinks: false option When followSymlinks is true (the default), chokidar follows symlinks and watches their targets. If a symlink points to a directory like the user's home directory, chokidar would recursively watch that entire directory structure, causing an explosion in file watchers (250k+). This change aligns with other file watchers in the codebase (kitsController.ts, variant.ts, extension.ts) which all use followSymlinks: false. Co-authored-by: gcampbell-msft <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: gcampbell-msft <[email protected]> Co-authored-by: Hannia Valera <[email protected]>
1 parent 531bf0a commit e69b74e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/presets/presetsController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ export class PresetsController implements vscode.Disposable {
16121612
]);
16131613

16141614
this._presetsWatchers?.dispose();
1615-
this._presetsWatchers = new FileWatcher(this._referencedFiles, events, { ignoreInitial: true });
1615+
this._presetsWatchers = new FileWatcher(this._referencedFiles, events, { ignoreInitial: true, followSymlinks: false });
16161616
};
16171617

16181618
dispose() {

0 commit comments

Comments
 (0)