chore: generate

pull/14736/head
opencode-agent[bot] 2026-02-22 23:49:51 +00:00
parent a74fedd23b
commit faa63227ac
1 changed files with 4 additions and 3 deletions

View File

@ -113,9 +113,10 @@ export function createPathHelpers(scope: () => string) {
const windows = /^[A-Za-z]:/.test(root)
const canonRoot = windows ? root.toLowerCase() : root
const canonPath = windows ? path.toLowerCase() : path
if (canonPath.startsWith(canonRoot) &&
(canonRoot.endsWith("/") || canonPath === canonRoot ||
canonPath.startsWith(canonRoot + "/"))) {
if (
canonPath.startsWith(canonRoot) &&
(canonRoot.endsWith("/") || canonPath === canonRoot || canonPath.startsWith(canonRoot + "/"))
) {
// If we match canonRoot + "/", the slash will be removed below.
path = path.slice(root.length)
}