From 5b025ab4969cd304616db8b2ccf1a5e9cf81809e Mon Sep 17 00:00:00 2001 From: BeniBenj Date: Wed, 24 Apr 2024 13:11:11 +0200 Subject: [PATCH] fixes #211226 --- .../workbench/services/editor/common/customEditorLabelService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/services/editor/common/customEditorLabelService.ts b/src/vs/workbench/services/editor/common/customEditorLabelService.ts index ceb97268c12..648b1c9c079 100644 --- a/src/vs/workbench/services/editor/common/customEditorLabelService.ts +++ b/src/vs/workbench/services/editor/common/customEditorLabelService.ts @@ -177,6 +177,7 @@ export class CustomEditorLabelService extends Disposable implements ICustomEdito private getNthDirname(path: string, filename: string, n: number): string | undefined { // grand-parent/parent/filename.ext1.ext2 -> [grand-parent, parent] + path = path.startsWith('/') ? path.slice(1) : path; const pathFragments = path.split('/'); const length = pathFragments.length;