mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 03:47:55 +01:00
Co-authored-by: guangwu <guoguangwu@magic-shield.com>
This commit is contained in:
parent
ac65aeecbd
commit
f45df3e3f9
@ -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 New Issue
Block a user