Skip to content

Commit 8e9f030

Browse files
committed
close opened file
1 parent 72224b5 commit 8e9f030

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

writer.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ func NewWriterFromReader(w io.Writer, r *Reader) (*Writer, error) {
6464
if err != nil {
6565
return nil, err
6666
}
67-
io.Copy(pw, rc)
67+
_, err = io.Copy(pw, rc)
68+
rc.Close()
69+
if err != nil {
70+
return nil, err
71+
}
6872
}
6973
ow.Properties = r.Properties
7074
ow.Relationships = make([]*Relationship, len(r.Relationships))

0 commit comments

Comments
 (0)