提交 ff042e9f 编写于 作者: I isidor

fixes #114203

上级 381b99f6
......@@ -21,6 +21,7 @@ import { match } from 'vs/base/common/glob';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IPathService } from 'vs/workbench/services/path/common/pathService';
import { hasDriveLetter } from 'vs/base/common/extpath';
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint<ResourceLabelFormatter[]>({
extensionPoint: 'resourceLabelFormatters',
......@@ -73,10 +74,6 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
const sepRegexp = /\//g;
const labelMatchingRegexp = /\$\{(scheme|authority|path|(query)\.(.+?))\}/g;
function hasDriveLetter(path: string): boolean {
return !!(path && path[2] === ':');
}
class ResourceLabelFormattersHandler implements IWorkbenchContribution {
private formattersDisposables = new Map<ResourceLabelFormatter, IDisposable>();
......@@ -268,7 +265,7 @@ export class LabelService extends Disposable implements ILabelService {
});
// convert \c:\something => C:\something
if (formatting.normalizeDriveLetter && hasDriveLetter(label)) {
if (formatting.normalizeDriveLetter && hasDriveLetter(label.substr(1))) {
label = label.charAt(1).toUpperCase() + label.substr(2);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册