Skip to content

Commit 2e1e728

Browse files
committed
[extractor] avoid bailing out if file can't be opened
1 parent f4d25f0 commit 2e1e728

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/download.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func extractTarGz(body []byte, location string) (string, error) {
434434

435435
file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, info.Mode())
436436
if err != nil {
437-
return location, err
437+
continue
438438
}
439439
_, err = io.Copy(file, tarReader)
440440
if err != nil {
@@ -457,7 +457,7 @@ func (t *Tools) installDrivers(location string) error {
457457
t.Logger.Println(ok)
458458
if ok == OK_PRESSED {
459459
os.Chdir(location)
460-
oscmd := exec.Command("post_install"+extension)
460+
oscmd := exec.Command("post_install" + extension)
461461
if runtime.GOOS != "linux" {
462462
// spawning a shell could be the only way to let the user type his password
463463
TellCommandNotToSpawnShell(oscmd)
@@ -520,7 +520,8 @@ func extractBz2(body []byte, location string) (string, error) {
520520

521521
file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, info.Mode())
522522
if err != nil {
523-
return location, err
523+
continue
524+
//return location, err
524525
}
525526
_, err = io.Copy(file, tarReader)
526527
if err != nil {

0 commit comments

Comments
 (0)