~welt/murse

3391dfb8fa200e5b6319b0805fb409a21ca54dae — welt 3 months ago 59f9231 v0.0.4
Fix file not being truncated
3 files changed, 3 insertions(+), 3 deletions(-)

M client.go
M const.go
M verify.go
M client.go => client.go +1 -1
@@ 34,7 34,7 @@ func (c *Client) get(url string) (io.ReadCloser, error) {
		return nil, err
	}

	req.Header.Add("User-Agent", "murse/0.0.0")
	req.Header.Add("User-Agent", "murse/"+VERSION)

	resp, err := c.h.Do(req)
	if err != nil {

M const.go => const.go +1 -1
@@ 1,6 1,6 @@
package main

const VERSION = "0.0.3"
const VERSION = "0.0.4"

const (
	DESC_UPGRADE = "Upgrades your game files to the latest version."

M verify.go => verify.go +1 -1
@@ 120,7 120,7 @@ func verifyMain(dir string, url string, repair bool, http2 bool) int {

				defer object.Close()

				file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0777)
				file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0777)
				if err != nil {
					return err
				}