label: authority prefix

fixes #58222
This commit is contained in:
isidor
2018-09-26 15:39:35 +02:00
parent 89a07de60c
commit b127b2b4e5
2 changed files with 6 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ export interface LabelRules {
separator: '/' | '\\' | '';
tildify?: boolean;
normalizeDriveLetter?: boolean;
authorityPrefix?: string;
};
workspace?: {
suffix: string;
@@ -168,6 +169,9 @@ export class LabelService implements ILabelService {
if (formatter.uri.tildify && !forceNoTildify) {
label = tildify(label, this.environmentService.userHome);
}
if (formatter.uri.authorityPrefix && resource.authority) {
label = formatter.uri.authorityPrefix + label;
}
return label.replace(sepRegexp, formatter.uri.separator);
}

View File

@@ -63,7 +63,8 @@ class FileUriLabelContribution implements IWorkbenchContribution {
label: '${authority}${path}',
separator: nativeSep,
tildify: !platform.isWindows,
normalizeDriveLetter: platform.isWindows
normalizeDriveLetter: platform.isWindows,
authorityPrefix: nativeSep + nativeSep
},
workspace: {
suffix: ''