ls: Improve output

This commit is contained in:
Alexander Neumann
2018-03-30 22:35:18 +02:00
parent 6a7c23d2ae
commit a069467e72
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -64,8 +64,9 @@ func formatDuration(d time.Duration) string {
}
func formatNode(prefix string, n *restic.Node, long bool) string {
nodepath := prefix + string(filepath.Separator) + n.Name
if !long {
return filepath.Join(prefix, n.Name)
return nodepath
}
var mode os.FileMode
@@ -91,6 +92,6 @@ func formatNode(prefix string, n *restic.Node, long bool) string {
return fmt.Sprintf("%s %5d %5d %6d %s %s%s",
mode|n.Mode, n.UID, n.GID, n.Size,
n.ModTime.Format(TimeFormat), filepath.Join(prefix, n.Name),
n.ModTime.Format(TimeFormat), nodepath,
target)
}