AlteredCoder %!s(int64=5) %!d(string=hai) anos
pai
achega
b317fcea0e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/types/dataset.go

+ 1 - 1
pkg/types/dataset.go

@@ -42,7 +42,7 @@ func downloadFile(url string, destPath string) error {
 		return fmt.Errorf("download response 'HTTP %d' : %s", resp.StatusCode, string(body))
 		return fmt.Errorf("download response 'HTTP %d' : %s", resp.StatusCode, string(body))
 	}
 	}
 
 
-	file, err := os.OpenFile(destPath, os.O_RDWR|os.O_CREATE, 0644)
+	file, err := os.OpenFile(destPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}