From fe9b9417462dc6798eb32cfbc0b42da32e7e0b58 Mon Sep 17 00:00:00 2001 From: zu1k Date: Sun, 10 Apr 2022 20:19:07 +0800 Subject: [PATCH] fix: ZXIPv6 database download #91 --- go.mod | 2 +- go.sum | 2 ++ pkg/zxipv6wry/update.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 6dcb4f7..d0e4b71 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,6 @@ require ( github.com/saracen/solidblock v0.0.0-20190426153529-45df20abab6f // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.10 // indirect - golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0 // indirect + golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f // indirect golang.org/x/tools v0.1.7 // indirect ) diff --git a/go.sum b/go.sum index 46dd19f..3a87e0d 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0 h1:PgUUmg0gNMIPY2WafhL/oLyQGw+kdTNPlVWOjltpp3w= golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f h1:8w7RhxzTVgUzw/AH/9mUV5q0vMgy40SQRursCcfmkCw= +golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= diff --git a/pkg/zxipv6wry/update.go b/pkg/zxipv6wry/update.go index 64dc748..ec17459 100644 --- a/pkg/zxipv6wry/update.go +++ b/pkg/zxipv6wry/update.go @@ -38,7 +38,7 @@ func getData() (data []byte, err error) { return nil, err } defer os.Remove(file7z.Name()) - if err := common.SaveFile(file7z.Name(), data); err == nil { + if err := ioutil.WriteFile(file7z.Name(), data, 0644); err == nil { return Un7z(file7z.Name()) } return