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
This commit is contained in:
Alexander Neumann 2018-04-30 22:03:11 +02:00
parent 84f82dae1a
commit 64d98945a6
1 changed files with 1 additions and 1 deletions

View File

@ -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 (