From 6b6893bcae48831714cd4bd07f017717642b0465 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 6 Oct 2025 17:29:27 +0200 Subject: [PATCH] Extract a InternalTreePathForFilePath helper function --- pkg/gui/filetree/build_tree.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/gui/filetree/build_tree.go b/pkg/gui/filetree/build_tree.go index 8e6e9264b..91e6d1986 100644 --- a/pkg/gui/filetree/build_tree.go +++ b/pkg/gui/filetree/build_tree.go @@ -162,9 +162,13 @@ func join(strs []string) string { } func SplitFileTreePath(path string, showRootItem bool) []string { + return split(InternalTreePathForFilePath(path, showRootItem)) +} + +func InternalTreePathForFilePath(path string, showRootItem bool) string { if showRootItem { - return split("./" + path) + return "./" + path } - return split(path) + return path }