Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Mar 4, 2024
1 parent 5eb69cd commit 3a0c124
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions metainfo/info.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package metainfo

import (
"bufio"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -99,7 +98,7 @@ func (info *Info) writeFiles(w io.Writer, open func(fi FileInfo) (io.ReadCloser,
if err != nil {
return fmt.Errorf("error opening %v: %s", fi, err)
}
wn, err := io.CopyN(w, bufio.NewReaderSize(r, 4*1024*1024), fi.Length)
wn, err := io.CopyN(w, r, fi.Length)
r.Close()
if wn != fi.Length {
return fmt.Errorf("error copying %v: %s", fi, err)
Expand Down

0 comments on commit 3a0c124

Please sign in to comment.