mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-08 22:52:12 +02:00
Extract a InternalTreePathForFilePath helper function
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user