Skip to content

Commit

Permalink
use buf
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Aug 17, 2023
1 parent 24289ee commit 314dff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/go/0chain.net/blobbercore/filestore/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ func (fs *FileStore) WriteFile(allocID, conID string, fileData *FileInputData, i
if err != nil {
return nil, common.NewError("file_seek_error", err.Error())
}

writtenSize, err := io.Copy(f, infile)
buf := make([]byte, BufferSize)
writtenSize, err := io.CopyBuffer(f, infile, buf)
if err != nil {
return nil, common.NewError("file_write_error", err.Error())
}
Expand Down

0 comments on commit 314dff8

Please sign in to comment.