mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 18:44:16 +00:00
Co-authored-by: guangwu <guoguangwu@magic-shield.com> (cherry picked from commit f45df3e3f9255e5adc68f14c4e18c1e26a301a64)
This commit is contained in:
parent
39bc868092
commit
e83b6c7cd2
|
@ -44,7 +44,7 @@ func (c *FilesystemClient) Download(ctx context.Context, objects []Pointer, call
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
if err := callback(p, f, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func (c *FilesystemClient) Upload(ctx context.Context, objects []Pointer, callba
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
_, err = io.Copy(f, content)
|
||||
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue