Fix ppp
This commit is contained in:
parent
a8a5cc40e0
commit
4ebd60ecf9
@ -150,7 +150,11 @@ func download(packages map[string]packageInfo, url string, output string) {
|
|||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
rdr := io.Reader(resp.Body)
|
rdr := io.Reader(resp.Body)
|
||||||
path := output + pack.Name
|
opt := strings.Split(pack.FilePath, "/")[len(strings.Split(pack.FilePath, "/"))-1]
|
||||||
|
if opt == "" {
|
||||||
|
opt = pack.Name + ".deb"
|
||||||
|
}
|
||||||
|
path := output + opt
|
||||||
file, err := os.Create(path)
|
file, err := os.Create(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed to create file %s: %v \n", path, err)
|
fmt.Printf("Failed to create file %s: %v \n", path, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user