mirror of
https://github.com/restic/restic.git
synced 2026-10-12 21:17:12 +00:00
s3 migrate layout: Force old layout for rename
This commit is contained in:
1 parent
28a4a35625
commit
c54c632ca1
1 file changed
+7
@@ -54,11 +54,18 @@ func (m *S3Layout) Apply(ctx context.Context, repo restic.Repository) error {
|
||||
return errors.New("backend is not s3")
|
||||
}
|
||||
|
||||
oldLayout := &backend.S3LegacyLayout{
|
||||
Path: be.Path(),
|
||||
Join: path.Join,
|
||||
}
|
||||
|
||||
newLayout := &backend.DefaultLayout{
|
||||
Path: be.Path(),
|
||||
Join: path.Join,
|
||||
}
|
||||
|
||||
be.Layout = oldLayout
|
||||
|
||||
for _, t := range []restic.FileType{
|
||||
restic.KeyFile,
|
||||
restic.SnapshotFile,
|
||||
|
||||
Reference in new issue
Block a user