MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / Close

Method Close

drivers/mega/util.go:79–93  ·  view source on GitHub ↗

Close closed the file - MAC errors are reported here

()

Source from the content-addressed store, hash-verified

77
78// Close closed the file - MAC errors are reported here
79func (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}

Callers

nothing calls this directly

Calls 3

RetryFunction · 0.92
FinishMethod · 0.80
UnlockMethod · 0.65

Tested by

no test coverage detected