Merge pull request #1104 from harshavardhana/trim-prefix

Trim prefix from recursive multiple args output in ls
This commit is contained in:
Harshavardhana
2015-09-16 03:12:47 -07:00
+1 -1
View File
@@ -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))
}