minor fix for root labels

This commit is contained in:
isidor
2019-01-11 15:57:38 +01:00
parent a4d861e2c1
commit ff9f7cfbfe

View File

@@ -102,12 +102,12 @@ export class LabelService implements ILabelService {
// Workspace: Single Folder
if (isSingleFolderWorkspaceIdentifier(workspace)) {
// Folder on disk
const formatter = this.findFormatter(workspace);
const label = options && options.verbose ? this.getUriLabel(workspace) : resourceBasename(workspace);
const label = options && options.verbose ? this.getUriLabel(workspace) : resourceBasename(workspace) || '/';
if (workspace.scheme === Schemas.file) {
return label;
}
const formatter = this.findFormatter(workspace);
const suffix = formatter && formatter.workspace && (typeof formatter.workspace.suffix === 'string') ? formatter.workspace.suffix : workspace.scheme;
return suffix ? `${label} (${suffix})` : label;
}