mirror of https://github.com/restic/restic.git
forget: Join paths by ":"
This commit is contained in:
parent
8e7202bd6a
commit
00f647dc92
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue