Skip to content

Commit

Permalink
Merge pull request #19 from default-writer/master
Browse files Browse the repository at this point in the history
fixed bug in windows paths (ignore case fix) #20
  • Loading branch information
tenninebt committed Oct 27, 2022
2 parents b42a82b + ab18a96 commit d8d3a17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/coverage-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit d8d3a17

Please sign in to comment.