Close closed the file - MAC errors are reported here
()
| 77 | |
| 78 | // Close closed the file - MAC errors are reported here |
| 79 | func (oo *openObject) Close() (err error) { |
| 80 | oo.mu.Lock() |
| 81 | defer oo.mu.Unlock() |
| 82 | if oo.closed { |
| 83 | return nil |
| 84 | } |
| 85 | err = utils.Retry(3, 500*time.Millisecond, func() (err error) { |
| 86 | return oo.d.Finish() |
| 87 | }) |
| 88 | if err != nil { |
| 89 | return fmt.Errorf("failed to finish download: %w", err) |
| 90 | } |
| 91 | oo.closed = true |
| 92 | return nil |
| 93 | } |