MCPcopy
hub / github.com/codeaashu/claude-code / checkWSLDistroMatch

Function checkWSLDistroMatch

src/utils/idePathConversion.ts:79–90  ·  view source on GitHub ↗
(
  windowsPath: string,
  wslDistroName: string,
)

Source from the content-addressed store, hash-verified

77 * Check if distro names match for WSL UNC paths
78 */
79export function checkWSLDistroMatch(
80 windowsPath: string,
81 wslDistroName: string,
82): boolean {
83 const wslUncMatch = windowsPath.match(
84 /^\\\\wsl(?:\.localhost|\$)\\([^\\]+)(.*)$/,
85 )
86 if (wslUncMatch) {
87 return wslUncMatch[1] === wslDistroName
88 }
89 return true // Not a WSL UNC path, so no distro mismatch
90}
91

Callers 1

detectIDEsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected