From a26aeafd08a19d6e6dcc6d0bcda9e5a327aff871 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 18 Dec 2015 17:35:43 +0900 Subject: [PATCH] WIP --- file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/file.go b/file.go index d038cc3..59f113b 100644 --- a/file.go +++ b/file.go @@ -71,14 +71,13 @@ func (f *file) export(dstPath string) error { return err } - f.rewind() - fh, err := os.Create(dstPath) if err != nil { return err } defer fh.Close() + f.rewind() if _, err := f.WriteTo(fh); err != nil { return err }