Skip to content

Commit b127b2b

Browse files
committed
label: authority prefix
fixes microsoft#58222
1 parent 89a07de commit b127b2b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface LabelRules {
4343
separator: '/' | '\\' | '';
4444
tildify?: boolean;
4545
normalizeDriveLetter?: boolean;
46+
authorityPrefix?: string;
4647
};
4748
workspace?: {
4849
suffix: string;
@@ -168,6 +169,9 @@ export class LabelService implements ILabelService {
168169
if (formatter.uri.tildify && !forceNoTildify) {
169170
label = tildify(label, this.environmentService.userHome);
170171
}
172+
if (formatter.uri.authorityPrefix && resource.authority) {
173+
label = formatter.uri.authorityPrefix + label;
174+
}
171175

172176
return label.replace(sepRegexp, formatter.uri.separator);
173177
}

src/vs/workbench/parts/files/electron-browser/files.contribution.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ class FileUriLabelContribution implements IWorkbenchContribution {
6363
label: '${authority}${path}',
6464
separator: nativeSep,
6565
tildify: !platform.isWindows,
66-
normalizeDriveLetter: platform.isWindows
66+
normalizeDriveLetter: platform.isWindows,
67+
authorityPrefix: nativeSep + nativeSep
6768
},
6869
workspace: {
6970
suffix: ''

0 commit comments

Comments
 (0)