Browse Source

fix(core): scope fff broad scanning

Dax Raad 1 tháng trước cách đây
mục cha
commit
68260ea6c9
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      packages/core/src/filesystem/search.ts

+ 3 - 2
packages/core/src/filesystem/search.ts

@@ -1,5 +1,6 @@
 export * as FileSystemSearch from "./search"
 
+import os from "os"
 import path from "path"
 import { Context, Effect, Layer, Scope } from "effect"
 import { Fff } from "#fff"
@@ -127,8 +128,8 @@ export const fffLayer = Layer.effect(
         Fff.create({
           basePath: location.directory,
           aiMode: true,
-          enableFsRootScanning: true,
-          enableHomeDirScanning: true,
+          enableFsRootScanning: location.directory === path.parse(location.directory).root,
+          enableHomeDirScanning: location.directory === os.homedir(),
         }),
       catch: (cause) => cause,
     }).pipe(Effect.orDie)