fix(task-change-ledger): preserve synthetic slash paths on Windows
This commit is contained in:
parent
e0d32d59ff
commit
1c5fce5f0a
1 changed files with 1 additions and 1 deletions
|
|
@ -1381,7 +1381,7 @@ export class TaskChangeLedgerReader {
|
||||||
private normalizeLedgerFilePath(filePath: string): string {
|
private normalizeLedgerFilePath(filePath: string): string {
|
||||||
const slashPath = filePath.replace(/\\/g, '/');
|
const slashPath = filePath.replace(/\\/g, '/');
|
||||||
const isWindowsAbsolute = /^[A-Za-z]:\//.test(slashPath) || slashPath.startsWith('//');
|
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 path.normalize(filePath);
|
||||||
}
|
}
|
||||||
return slashPath;
|
return slashPath;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue