mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-05 12:54:39 +00:00
refactor(core): reuse directory checks for move recovery
This commit is contained in:
parent
3b8283789d
commit
6fb36773a5
1 changed files with 1 additions and 3 deletions
|
|
@ -458,11 +458,9 @@ const layer = Layer.effect(
|
|||
)
|
||||
}),
|
||||
)
|
||||
const source = yield* fs.stat(current.location.directory).pipe(Effect.orElseSucceed(() => undefined))
|
||||
const unavailable =
|
||||
!(yield* execution.isActive(input.sessionID)) &&
|
||||
(!source ||
|
||||
source.type !== "Directory" ||
|
||||
(!(yield* fs.isDir(current.location.directory)) ||
|
||||
!(yield* locations.contextEffect(current.location).pipe(
|
||||
Effect.scoped,
|
||||
Effect.as(true),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue