mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
* fix(quick-open): prune generated dirs in git fallback * fix(source-control): narrow manual review provider switch * fix(quick-open): collapse git fallback directories Co-authored-by: Orca <help@stably.ai> * fix(quick-open): harden collapsed git directory expansion Co-authored-by: Orca <help@stably.ai> * fix(quick-open): close directory expansion races Co-authored-by: Orca <help@stably.ai> * perf(quick-open): collapse placeholders efficiently Co-authored-by: Orca <help@stably.ai> * fix(quick-open): preserve root and cancellation semantics Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> Co-authored-by: Orca <help@stably.ai>
8 lines
373 B
TypeScript
8 lines
373 B
TypeScript
import type { Stats } from 'node:fs'
|
|
|
|
export function isQuickOpenReadableDirectory(stat: Stats, allowSymlinkedRoot = false): boolean {
|
|
// Why: an explicitly selected workspace root may be a symlink, while nested
|
|
// traversal must never follow a symlink outside that authorized root.
|
|
return stat.isDirectory() || Boolean(allowSymlinkedRoot && stat.isSymbolicLink())
|
|
}
|