diff --git a/src/gutters.ts b/src/gutters.ts index 62ec756..76df876 100644 --- a/src/gutters.ts +++ b/src/gutters.ts @@ -62,7 +62,7 @@ export class Gutters { } if (!pickedReport) { throw new Error("Could not show Lcov Report file!"); } - const reportUri = Uri.parse(`file:///${pickedReport}`); + const reportUri = Uri.file(pickedReport.toString()); await commands.executeCommand( "vscode.previewHtml", reportUri, diff --git a/src/lcov.ts b/src/lcov.ts index 2d7ed77..5e169ee 100644 --- a/src/lcov.ts +++ b/src/lcov.ts @@ -36,7 +36,7 @@ export class Lcov { public findReports(): Promise { return new Promise((resolve, reject) => { this.glob.find( - `**/coverage/**/*.html`, + `**/coverage/**/index.html`, { ignore: "**/node_modules/**", cwd: this.vscode.getRootPath(), realpath: true }, (err, files) => { if (!files || !files.length) { return reject("Could not find a Lcov Report file!"); }