From cc6381f7d5543d6823b13a86f5abf0ec07684375 Mon Sep 17 00:00:00 2001 From: zounengren Date: Tue, 16 Mar 2021 15:59:07 +0800 Subject: [PATCH] Use WriteTo() instead --- tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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