fixed a bug with the reworked updater

* fix already included in 127 release, code will be merged with next release
This commit is contained in:
Jannik 2017-06-01 17:31:15 +02:00
parent e53d1d1176
commit 29517f5604
2 changed files with 2 additions and 7 deletions

Binary file not shown.

View File

@ -80,14 +80,9 @@ public class updater implements Runnable{
});
System.out.println("update available");
System.out.println("download link: " + browserDownloadUrl);
try {
//get the download-Data URL
URL downloadURL = new URL(browserDownloadUrl);
BufferedReader in = new BufferedReader(new InputStreamReader(downloadURL.openStream()));
String updateDataURL = in.readLine();
try {
//open new Http connection, ProgressMonitorInputStream for downloading the data
HttpURLConnection conn = (HttpURLConnection) new URL(updateDataURL).openConnection();
HttpURLConnection conn = (HttpURLConnection) new URL(browserDownloadUrl).openConnection();
ProgressMonitorInputStream pmis = new ProgressMonitorInputStream(null, "Downloading...", conn.getInputStream());
ProgressMonitor pm = pmis.getProgressMonitor();
pm.setMillisToDecideToPopup(0);