From 83ea70b9d4a54ddb61db806dbef3f79b055a3de9 Mon Sep 17 00:00:00 2001 From: Erik van der Boom Date: Wed, 22 Jul 2026 00:21:21 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- mcp-ts/src/tools.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcp-ts/src/tools.ts b/mcp-ts/src/tools.ts index 6ecc206..8248ece 100644 --- a/mcp-ts/src/tools.ts +++ b/mcp-ts/src/tools.ts @@ -1734,7 +1734,9 @@ function fileMatchesLanguage(root: string, file: string, language: string): bool function getStoryScanRoots(root: string, language: string): string[] { const storyRoot = path.join(root, storyFolder(root)); - if (!fs.existsSync(storyRoot) || !fs.statSync(storyRoot).isDirectory()) { + try { + if (!fs.statSync(storyRoot).isDirectory()) { return []; } + } catch { return []; } if (language === 'ALL') {