Skip to content

Commit a4d861e

Browse files
committed
do not show authority for workspace labels
1 parent 84b56fc commit a4d861e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/platform/label/common/label.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
88
import { Event } from 'vs/base/common/event';
99
import { IWorkspace } from 'vs/platform/workspace/common/workspace';
1010
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
11-
import { basenameOrAuthority } from 'vs/base/common/resources';
11+
import { basename as resourceBasename } from 'vs/base/common/resources';
1212
import { isLinux } from 'vs/base/common/platform';
1313
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, WORKSPACE_EXTENSION } from 'vs/platform/workspaces/common/workspaces';
1414
import { localize } from 'vs/nls';
@@ -51,7 +51,7 @@ const LABEL_SERVICE_ID = 'label';
5151

5252
export function getSimpleWorkspaceLabel(workspace: IWorkspaceIdentifier | URI, workspaceHome: string): string {
5353
if (isSingleFolderWorkspaceIdentifier(workspace)) {
54-
return basenameOrAuthority(workspace);
54+
return resourceBasename(workspace);
5555
}
5656
// Workspace: Untitled
5757
if (isParent(workspace.configPath, workspaceHome, !isLinux /* ignore case */)) {

src/vs/workbench/services/label/common/labelService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
99
import { Event, Emitter } from 'vs/base/common/event';
1010
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
1111
import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace';
12-
import { isEqual, basenameOrAuthority } from 'vs/base/common/resources';
12+
import { isEqual, basenameOrAuthority, basename as resourceBasename } from 'vs/base/common/resources';
1313
import { isLinux, isWindows } from 'vs/base/common/platform';
1414
import { tildify, getPathLabel } from 'vs/base/common/labels';
1515
import { ltrim, startsWith } from 'vs/base/common/strings';
@@ -103,7 +103,7 @@ export class LabelService implements ILabelService {
103103
if (isSingleFolderWorkspaceIdentifier(workspace)) {
104104
// Folder on disk
105105
const formatter = this.findFormatter(workspace);
106-
const label = options && options.verbose ? this.getUriLabel(workspace) : basenameOrAuthority(workspace);
106+
const label = options && options.verbose ? this.getUriLabel(workspace) : resourceBasename(workspace);
107107
if (workspace.scheme === Schemas.file) {
108108
return label;
109109
}

0 commit comments

Comments
 (0)