Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Path of files with '#' is cut in Markers resource (Problems) #136588 #136589

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/vs/base/common/uri.ts
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/tasks/common/problemCollectors.ts
Expand Up @@ -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);
}
}
Expand Down