This commit is contained in:
Alex Yatskov 2015-12-18 17:35:43 +09:00
parent f8d05ab28d
commit a26aeafd08

View File

@ -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
}