diff --git a/src/filesystem/path-utils.ts b/src/filesystem/path-utils.ts index 6ab5a5969b..9e9f5be141 100644 --- a/src/filesystem/path-utils.ts +++ b/src/filesystem/path-utils.ts @@ -93,6 +93,10 @@ export function normalizePath(p: string): string { // Handle Windows paths: convert slashes and ensure drive letter is capitalized if (normalized.match(/^[a-zA-Z]:/)) { + if (process.platform !== 'win32') { + // On POSIX, Windows drive paths (e.g. C:\...) are not native absolute paths; preserve or format cleanly + return normalized; + } let result = normalized.replace(/\//g, '\\'); // Capitalize drive letter if present if (/^[a-z]:/.test(result)) {