Close closed the file - MAC errors are reported here
()
| 1115 | |
| 1116 | // Close closed the file - MAC errors are reported here |
| 1117 | func (oo *openObject) Close() (err error) { |
| 1118 | oo.mu.Lock() |
| 1119 | defer oo.mu.Unlock() |
| 1120 | if oo.closed { |
| 1121 | return nil |
| 1122 | } |
| 1123 | err = oo.o.fs.pacer.Call(func() (bool, error) { |
| 1124 | err = oo.d.Finish() |
| 1125 | return shouldRetry(oo.ctx, err) |
| 1126 | }) |
| 1127 | if err != nil { |
| 1128 | return fmt.Errorf("failed to finish download: %w", err) |
| 1129 | } |
| 1130 | oo.closed = true |
| 1131 | return nil |
| 1132 | } |
| 1133 | |
| 1134 | // Open an object for read |
| 1135 | func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error) { |
nothing calls this directly
no test coverage detected