( full: string, entry: Dirent, parentReal: string, ancestors: Set<string> )
| 2041 | // ancestor on the current path — that's a cycle (a link back into the |
| 2042 | // vault, or an external loop) that would otherwise recurse forever. |
| 2043 | async function resolveDirDescent( |
| 2044 | full: string, |
| 2045 | entry: Dirent, |
| 2046 | parentReal: string, |
| 2047 | ancestors: Set<string> |
| 2048 | ): Promise<string | null> { |
| 2049 | let real: string |
| 2050 | if (entry.isDirectory()) { |
| 2051 | real = path.join(parentReal, entry.name) |
| 2052 | } else if (entry.isSymbolicLink()) { |
| 2053 | try { |
| 2054 | if (!(await fs.stat(full)).isDirectory()) return null |
| 2055 | real = await fs.realpath(full) |
| 2056 | } catch { |
| 2057 | return null |
| 2058 | } |
| 2059 | } else { |
| 2060 | return null |
| 2061 | } |
| 2062 | return ancestors.has(real) ? null : real |
| 2063 | } |
| 2064 | |
| 2065 | async function collectBuiltinSearchCandidates(root: string): Promise<VaultTextSearchCandidate[]> { |
| 2066 | const files: Array<{ full: string; folder: NoteFolder }> = [] |
no outgoing calls
no test coverage detected