From 4d24f2eab35ca9356a3ebf9ed2bc455981f2ede2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 28 Mar 2015 16:15:48 +0100 Subject: [PATCH] Correct plen for snapshots --- cmd/restic/cmd_backup.go | 2 +- cmd/restic/cmd_snapshots.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index b1a4731c8..db2d1ba55 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -245,7 +245,7 @@ func (cmd CmdBackup) Execute(args []string) error { return err } - fmt.Printf("snapshot %s saved\n", id[:plen]) + fmt.Printf("snapshot %s saved\n", id[:plen/2]) return nil } diff --git a/cmd/restic/cmd_snapshots.go b/cmd/restic/cmd_snapshots.go index fcec6d2c5..f5ebcd3fd 100644 --- a/cmd/restic/cmd_snapshots.go +++ b/cmd/restic/cmd_snapshots.go @@ -140,7 +140,7 @@ func (cmd CmdSnapshots) Execute(args []string) error { if len(sn.Paths) == 0 { continue } - tab.Rows = append(tab.Rows, []interface{}{sn.ID()[:plen], sn.Time.Format(TimeFormat), sn.Hostname, sn.Paths[0]}) + tab.Rows = append(tab.Rows, []interface{}{sn.ID()[:plen/2], sn.Time.Format(TimeFormat), sn.Hostname, sn.Paths[0]}) if len(sn.Paths) > 1 { for _, path := range sn.Paths {