mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 01:54:26 +00:00
Co-authored-by: guangwu <guoguangwu@magic-shield.com>
This commit is contained in:
parent
47de6e3b54
commit
4588c7b705
@ -44,7 +44,7 @@ func (c *FilesystemClient) Download(ctx context.Context, objects []Pointer, call
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
if err := callback(p, f, nil); err != nil {
|
if err := callback(p, f, nil); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ func (c *FilesystemClient) Upload(ctx context.Context, objects []Pointer, callba
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
_, err = io.Copy(f, content)
|
_, err = io.Copy(f, content)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user