MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / canonicalizePath

Function canonicalizePath

source code/utils/sessionStoragePortable.ts:341–347  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

339 * /tmp → /private/tmp on macOS) resolve to the same project directory.
340 */
341export async function canonicalizePath(dir: string): Promise<string> {
342 try {
343 return (await realpath(dir)).normalize('NFC')
344 } catch {
345 return dir.normalize('NFC')
346 }
347}
348
349/**
350 * Finds the project directory for a given path, tolerating hash mismatches

Callers 2

gatherProjectCandidatesFunction · 0.85
resolveSessionFilePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected