Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Oct 10, 2023
1 parent 45c91b3 commit 2096d94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metainfo/info.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package metainfo

import (
"bufio"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -94,7 +95,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, r, fi.Length)
wn, err := io.CopyN(w, bufio.NewReader(r), fi.Length)
r.Close()
if wn != fi.Length {
return fmt.Errorf("error copying %v: %s", fi, err)
Expand Down

0 comments on commit 2096d94

Please sign in to comment.