From 64d98945a664981fdb63b53fc11a73577c0cc0d0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 30 Apr 2018 22:03:11 +0200 Subject: [PATCH] backup: Clean target paths before finding parent This resolves an issue described in the forum where restic could not find a parent snapshot if the target path ends with a slash: https://forum.restic.net/t/new-archiver-code-please-test/623/23 --- internal/restic/snapshot_find.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/restic/snapshot_find.go b/internal/restic/snapshot_find.go index f16b91e3d..e7747c561 100644 --- a/internal/restic/snapshot_find.go +++ b/internal/restic/snapshot_find.go @@ -24,7 +24,7 @@ func FindLatestSnapshot(ctx context.Context, repo Repository, targets []string, return ID{}, errors.Wrap(err, "Abs") } } - absTargets = append(absTargets, target) + absTargets = append(absTargets, filepath.Clean(target)) } var (