mirror of
https://github.com/restic/restic.git
synced 2025-10-20 10:02:07 +00:00
forget: Join paths by ":"
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user