MCPcopy Index your code
hub / github.com/codeaashu/claude-code / pathsOverlap

Function pathsOverlap

src/utils/plugins/orphanedPluginFilter.ts:99–109  ·  view source on GitHub ↗

* One path is a prefix of the other. Special-cases root (normalize('/') + sep * = '//'). Case-insensitive on win32 since normalize() doesn't lowercase * drive letters and CLAUDE_CODE_PLUGIN_CACHE_DIR may disagree with resolved.

(a: string, b: string)

Source from the content-addressed store, hash-verified

97 * drive letters and CLAUDE_CODE_PLUGIN_CACHE_DIR may disagree with resolved.
98 */
99function pathsOverlap(a: string, b: string): boolean {
100 const na = normalizeForCompare(a)
101 const nb = normalizeForCompare(b)
102 return (
103 na === nb ||
104 na === sep ||
105 nb === sep ||
106 na.startsWith(nb + sep) ||
107 nb.startsWith(na + sep)
108 )
109}
110
111function normalizeForCompare(p: string): string {
112 const n = normalize(p)

Callers 1

Calls 1

normalizeForCompareFunction · 0.85

Tested by

no test coverage detected