From ab18a96f9568093ca7acc7690ef0fd2a96ae56ae Mon Sep 17 00:00:00 2001 From: Artur Mustafin Date: Wed, 31 Aug 2022 15:27:40 +0300 Subject: [PATCH] fixed bug in windows paths (ingore case fix) --- src/coverage-parser.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/coverage-parser.ts b/src/coverage-parser.ts index b00ea08..dd75c22 100644 --- a/src/coverage-parser.ts +++ b/src/coverage-parser.ts @@ -75,9 +75,13 @@ export class CoverageParser { let filePath = section.file; if(iopath.isAbsolute(section.file)){ //Convert to a path relative to the workspace root - filePath = filePath.replace(workspaceFolder.uri.fsPath, ""); + if (filePath.toLowerCase().startsWith(workspaceFolder.uri.fsPath.toLowerCase())) + { + filePath = filePath.substring(workspaceFolder.uri.fsPath.length); + } + section.file = filePath; } - + sections.set(filePath, section); };