restoreBackupFile restores a backup file after upload failure
(ctx context.Context, backupUUID, origName, origType string)
| 1076 | |
| 1077 | // restoreBackupFile restores a backup file after upload failure |
| 1078 | func (o *Object) restoreBackupFile(ctx context.Context, backupUUID, origName, origType string) { |
| 1079 | if backupUUID == "" { |
| 1080 | return |
| 1081 | } |
| 1082 | |
| 1083 | _ = o.f.pacer.Call(func() (bool, error) { |
| 1084 | err := files.RenameFile(ctx, o.f.cfg, backupUUID, |
| 1085 | o.f.opt.Encoding.FromStandardName(origName), origType) |
| 1086 | return o.f.shouldRetry(ctx, err) |
| 1087 | }) |
| 1088 | } |
| 1089 | |
| 1090 | // Remove deletes a file |
| 1091 | func (o *Object) Remove(ctx context.Context) error { |
no test coverage detected