v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
Showing only changes of commit 847b589822 - Show all commits

View File

@ -51,11 +51,17 @@ func hashChunk(data [][]byte) {
} }
} }
func BuildTreeD(data io.Reader, unpaddedData bool, outPath string, size abi.PaddedPieceSize) (cid.Cid, error) { func BuildTreeD(data io.Reader, unpaddedData bool, outPath string, size abi.PaddedPieceSize) (_ cid.Cid, err error) {
out, err := os.Create(outPath) out, err := os.Create(outPath)
if err != nil { if err != nil {
return cid.Undef, err return cid.Undef, err
} }
defer func() {
cerr := out.Close()
if cerr != nil {
err = multierror.Append(err, cerr)
}
}()
outSize := treeSize(size) outSize := treeSize(size)