MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / normalizePathForComparison

Function normalizePathForComparison

apps/kimi-code/src/cli/update/source.ts:91–99  ·  view source on GitHub ↗
(filePath: string, platform: NodeJS.Platform)

Source from the content-addressed store, hash-verified

89}
90
91function normalizePathForComparison(filePath: string, platform: NodeJS.Platform): string | null {
92 const trimmed = filePath.trim();
93 if (trimmed.length === 0) return null;
94 try {
95 return normalizeResolvedPath(realpathSync(trimmed), platform);
96 } catch {
97 return normalizeResolvedPath(resolve(trimmed), platform);
98 }
99}
100
101function normalizeResolvedPath(filePath: string, platform: NodeJS.Platform): string {
102 const resolvedPath = resolve(filePath);

Callers 1

classifyInstallSourceFunction · 0.85

Calls 2

normalizeResolvedPathFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected