diff --git a/tx.go b/tx.go index 4b1a64a..744b587 100644 --- a/tx.go +++ b/tx.go @@ -393,7 +393,7 @@ func (tx *Tx) CopyFile(path string, mode os.FileMode) error { return err } - err = tx.Copy(f) + _, err = tx.WriteTo(f) if err != nil { _ = f.Close() return err