From 9b9588e864cc5b79e03af4e0faac9c0fe59ab7e4 Mon Sep 17 00:00:00 2001 From: teddiesloco Date: Sat, 29 Aug 2026 12:30:28 +0700 Subject: [PATCH] fix(filesystem): prevent forced backslash conversion of drive paths on POSIX (#4686) --- src/filesystem/path-utils.ts | 4 ++++ 1 file changed, 4 insertions(+) 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)) {