This commit is contained in:
Jiogo18 2021-11-26 13:50:20 -08:00 committed by GitHub
commit 036188265e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -302,6 +302,10 @@ export class URI implements UriComponents {
*/
static file(path: string): URI {
if (path.startsWith('file:///')) {
path = path.replace('file:///', '');
}
let authority = _empty;
// normalize to fwd-slashes on windows,
@ -324,7 +328,7 @@ export class URI implements UriComponents {
}
}
return new Uri('file', authority, path, _empty, _empty);
return new Uri('file', authority, percentDecode(path), _empty, _empty);
}
static from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {

View file

@ -316,7 +316,7 @@ export abstract class AbstractProblemCollector implements IDisposable {
if (markers.size !== reported.get(resource)) {
let toSet: IMarkerData[] = [];
markers.forEach(value => toSet.push(value));
this.markerService.changeOne(owner, URI.parse(resource), toSet);
this.markerService.changeOne(owner, URI.file(resource), toSet);
reported.set(resource, markers.size);
}
}