Skip to content

Commit 11384f9

Browse files
committed
fix symlinks extractions
1 parent 6f51fb9 commit 11384f9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func spDownloadTool(name string, url string) {
9898
h.broadcastSys <- mapB
9999
return
100100
}
101-
err = Unzip(fileName, tempToolsPath)
101+
err = UnzipWrapper(fileName, tempToolsPath)
102102
if err != nil {
103103
log.Error("Could not unzip flashing tools!")
104104
mapD := map[string]string{"DownloadStatus": "Error", "Msg": err.Error()}

update.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import (
4141
"github.com/inconshreveable/go-update"
4242
"github.com/kardianos/osext"
4343
"github.com/kr/binarydist"
44+
"github.com/pivotal-golang/archiver/extractor"
4445
patch "github.com/sanderhahn/gozip/patchzip"
4546
"io"
4647
"io/ioutil"
@@ -54,6 +55,11 @@ import (
5455
"time"
5556
)
5657

58+
func UnzipWrapper(src, dest string) error {
59+
e := extractor.NewDetectable()
60+
return e.Extract(src, dest)
61+
}
62+
5763
func IsZip(path string) bool {
5864
r, err := zip.OpenReader(path)
5965
if err == nil {

0 commit comments

Comments
 (0)