فهرست منبع

chore: generate

opencode-agent[bot] 1 ماه پیش
والد
کامیت
faa63227ac
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      packages/app/src/context/file/path.ts

+ 4 - 3
packages/app/src/context/file/path.ts

@@ -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)
     }