Skip to content

Commit c34c9fa

Browse files
committed
Avoid using path.join for sarif uris
These are uris, not paths and always use '/', even on windows.
1 parent 03f1e4e commit c34c9fa

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

extensions/ql-vscode/src/sarif-utils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Sarif from 'sarif';
2-
import * as path from 'path';
32
import { ResolvableLocationValue } from './bqrs-cli-types';
43

54
export interface SarifLink {
@@ -74,9 +73,7 @@ export function getPathRelativeToSourceLocationPrefix(
7473
sarifRelativeUri: string
7574
) {
7675
const normalizedSourceLocationPrefix = sourceLocationPrefix.replace(/\\/g, '/');
77-
return `file:${
78-
path.join(normalizedSourceLocationPrefix, sarifRelativeUri)
79-
}`;
76+
return `file:${normalizedSourceLocationPrefix}/${sarifRelativeUri}`;
8077
}
8178

8279
export function parseSarifLocation(

0 commit comments

Comments
 (0)