diff --git a/src/vs/platform/label/common/label.ts b/src/vs/platform/label/common/label.ts index 8de1893da38..a003d9d1dd1 100644 --- a/src/vs/platform/label/common/label.ts +++ b/src/vs/platform/label/common/label.ts @@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { Event } from 'vs/base/common/event'; import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { basenameOrAuthority } from 'vs/base/common/resources'; +import { basename as resourceBasename } from 'vs/base/common/resources'; import { isLinux } from 'vs/base/common/platform'; import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, WORKSPACE_EXTENSION } from 'vs/platform/workspaces/common/workspaces'; import { localize } from 'vs/nls'; @@ -51,7 +51,7 @@ const LABEL_SERVICE_ID = 'label'; export function getSimpleWorkspaceLabel(workspace: IWorkspaceIdentifier | URI, workspaceHome: string): string { if (isSingleFolderWorkspaceIdentifier(workspace)) { - return basenameOrAuthority(workspace); + return resourceBasename(workspace); } // Workspace: Untitled if (isParent(workspace.configPath, workspaceHome, !isLinux /* ignore case */)) { diff --git a/src/vs/workbench/services/label/common/labelService.ts b/src/vs/workbench/services/label/common/labelService.ts index 146c7bd4b9d..d3fd3ea2945 100644 --- a/src/vs/workbench/services/label/common/labelService.ts +++ b/src/vs/workbench/services/label/common/labelService.ts @@ -9,7 +9,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { Event, Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; -import { isEqual, basenameOrAuthority } from 'vs/base/common/resources'; +import { isEqual, basenameOrAuthority, basename as resourceBasename } from 'vs/base/common/resources'; import { isLinux, isWindows } from 'vs/base/common/platform'; import { tildify, getPathLabel } from 'vs/base/common/labels'; import { ltrim, startsWith } from 'vs/base/common/strings'; @@ -103,7 +103,7 @@ export class LabelService implements ILabelService { if (isSingleFolderWorkspaceIdentifier(workspace)) { // Folder on disk const formatter = this.findFormatter(workspace); - const label = options && options.verbose ? this.getUriLabel(workspace) : basenameOrAuthority(workspace); + const label = options && options.verbose ? this.getUriLabel(workspace) : resourceBasename(workspace); if (workspace.scheme === Schemas.file) { return label; }