Skip to content

Commit 3ff43d0

Browse files
committed
path labels: if resource belongs to a root to show relative label use paths not toString (it encodes)
fixes microsoft#52512
1 parent b646671 commit 3ff43d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/base/common/labels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function getPathLabel(resource: URI | string, userHomeProvider: IUserHome
4545
if (isEqual(baseResource.uri, resource, !isLinux)) {
4646
pathLabel = ''; // no label if paths are identical
4747
} else {
48-
pathLabel = normalize(ltrim(resource.toString().substr(baseResource.uri.toString().length), sep), true);
48+
pathLabel = normalize(ltrim(resource.path.substr(baseResource.uri.path.length), sep), true);
4949
}
5050

5151
if (hasMultipleRoots) {

0 commit comments

Comments
 (0)