From b0dbd398ab62a1993d1a94c9ce925762f99581a7 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Fri, 28 Aug 2026 11:33:24 +0200 Subject: [PATCH] refactor(core): simplify root prefix check --- packages/core/src/kilocode/fff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/kilocode/fff.ts b/packages/core/src/kilocode/fff.ts index 6b46227f2a..5601adc1de 100644 --- a/packages/core/src/kilocode/fff.ts +++ b/packages/core/src/kilocode/fff.ts @@ -21,7 +21,7 @@ function real(directory: string) { export function allowed(directory: string, home = (process.env.KILO_TEST_HOME ?? os.homedir()).trim()) { const value = path.win32.normalize(directory) const prefix = "\\\\?\\UNC\\" - const windows = value.toUpperCase().startsWith(prefix.toUpperCase()) ? `\\\\${value.slice(prefix.length)}` : value + const windows = value.toUpperCase().startsWith(prefix) ? `\\\\${value.slice(prefix.length)}` : value if (root(directory, path.posix) || root(windows, path.win32)) return false const resolved = real(directory) if (root(resolved, path)) return false