mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Extract a InternalTreePathForFilePath helper function
This commit is contained in:
parent
fb00584f4d
commit
5811f2945c
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue