From 8adfb595b76d93781cf303c2ea45a81cfddc3a08 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 16 Sep 2015 03:10:25 -0700 Subject: [PATCH] Trim prefix from recursive multiple args output in ls --- ls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls.go b/ls.go index 6bc8cb1c..cb429214 100644 --- a/ls.go +++ b/ls.go @@ -132,7 +132,7 @@ func doList(clnt client.Client, recursive, multipleArgs bool) *probe.Error { break } if multipleArgs && parentContent.Type.IsDir() { - contentCh.Content.Name = filepath.Join(parentContent.Name, contentCh.Content.Name) + contentCh.Content.Name = filepath.Join(parentContent.Name, strings.TrimPrefix(contentCh.Content.Name, parentContent.Name)) } Prints("%s\n", parseContent(contentCh.Content)) }