Skip to content

Commit

Permalink
Fix create archive to a continuous writing source file failed
Browse files Browse the repository at this point in the history
  • Loading branch information
halfcrazy committed Sep 20, 2023
1 parent aa12f39 commit c55f399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion archiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func openAndCopyFile(file File, w io.Writer) error {
return err
}
defer fileReader.Close()
_, err = io.Copy(w, fileReader)
_, err = io.CopyN(w, fileReader, file.Size())
return err
}

Expand Down

0 comments on commit c55f399

Please sign in to comment.