fix(task-change-ledger): preserve synthetic slash paths on Windows

This commit is contained in:
777genius 2026-04-21 18:27:50 +03:00
parent e0d32d59ff
commit 1c5fce5f0a

View file

@ -1381,7 +1381,7 @@ export class TaskChangeLedgerReader {
private normalizeLedgerFilePath(filePath: string): string {
const slashPath = filePath.replace(/\\/g, '/');
const isWindowsAbsolute = /^[A-Za-z]:\//.test(slashPath) || slashPath.startsWith('//');
if (path.isAbsolute(filePath) || isWindowsAbsolute) {
if (isWindowsAbsolute || (process.platform !== 'win32' && path.isAbsolute(filePath))) {
return path.normalize(filePath);
}
return slashPath;