Skip to content

Commit 5811f29

Browse files
committed
Extract a InternalTreePathForFilePath helper function
1 parent fb00584 commit 5811f29

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/gui/filetree/build_tree.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,13 @@ func join(strs []string) string {
162162
}
163163

164164
func SplitFileTreePath(path string, showRootItem bool) []string {
165+
return split(InternalTreePathForFilePath(path, showRootItem))
166+
}
167+
168+
func InternalTreePathForFilePath(path string, showRootItem bool) string {
165169
if showRootItem {
166-
return split("./" + path)
170+
return "./" + path
167171
}
168172

169-
return split(path)
173+
return path
170174
}

0 commit comments

Comments
 (0)