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 }