forget: Join paths by ":"

This commit is contained in:
Alexander Neumann 2016-08-20 17:59:10 +02:00
parent 8e7202bd6a
commit 00f647dc92
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@ package main
import ( import (
"fmt" "fmt"
"io" "io"
"path"
"restic" "restic"
"restic/backend" "restic/backend"
"strings"
) )
// CmdForget implements the 'forget' command. // CmdForget implements the 'forget' command.
@ -125,7 +125,7 @@ func (cmd CmdForget) Execute(args []string) error {
snapshotGroups := make(map[key]restic.Snapshots) snapshotGroups := make(map[key]restic.Snapshots)
for _, sn := range snapshots { for _, sn := range snapshots {
k := key{Hostname: sn.Hostname, Dirs: path.Join(sn.Paths...)} k := key{Hostname: sn.Hostname, Dirs: strings.Join(sn.Paths, ":")}
list := snapshotGroups[k] list := snapshotGroups[k]
list = append(list, sn) list = append(list, sn)
snapshotGroups[k] = list snapshotGroups[k] = list