From a61d5d32a8c6f5722b1ccac6ea78b72563364960 Mon Sep 17 00:00:00 2001 From: knoxfighter Date: Sat, 21 Oct 2017 15:29:12 +0200 Subject: [PATCH] reverted delete file creation --- src/mod_modInfo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod_modInfo.go b/src/mod_modInfo.go index dc55fbb..7c9d17f 100644 --- a/src/mod_modInfo.go +++ b/src/mod_modInfo.go @@ -141,6 +141,12 @@ func (mod_info_list *ModInfoList) createMod(mod_name string, file_name string, m } defer new_file.Close() + _, err = io.Copy(new_file, mod_file) + if err != nil { + log.Printf("error on copying file to disk: %s", err) + return err + } + //reload the list err = new_file.Close() if err != nil {