diff --git a/pom.xml b/pom.xml
index 3a37a6d..c52bdad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com
cemu_UI
- 0.2.2-SNAPSHOT
+ 0.2.3-SNAPSHOT
jar
cemu_UI
diff --git a/src/main/java/com/cemu_UI/application/Main.java b/src/main/java/com/cemu_UI/application/Main.java
index 905fd98..652b049 100644
--- a/src/main/java/com/cemu_UI/application/Main.java
+++ b/src/main/java/com/cemu_UI/application/Main.java
@@ -168,9 +168,6 @@ public class Main extends Application {
}
}
-
-
-
// loading settings and initialize UI, dbController.main() loads all databases
mainWindowController.init();
mainWindowController.dbController.init();
diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java
index 157fde2..55fb730 100644
--- a/src/main/java/com/cemu_UI/application/MainWindowController.java
+++ b/src/main/java/com/cemu_UI/application/MainWindowController.java
@@ -559,7 +559,7 @@ public class MainWindowController {
LOGGER.info("copying the content of " + updatePath + " to " + destDir.toString());
playBtn.setText(playBtnUpdating);
playBtn.setDisable(true);
- FileUtils.copyDirectory(srcDir, destDir); // TODO progress indicator
+ FileUtils.copyDirectory(srcDir, destDir);
playBtn.setText(playBtnPlay);
playBtn.setDisable(false);
LOGGER.info("copying files done!");
@@ -610,7 +610,7 @@ public class MainWindowController {
LOGGER.info("copying the content of " + dlcPath + " to " + destDir.toString());
playBtn.setText(playBtnCopyingFiles);
playBtn.setDisable(true);
- FileUtils.copyDirectory(srcDir, destDir); // TODO progress indicator
+ FileUtils.copyDirectory(srcDir, destDir);
playBtn.setText(playBtnPlay);
playBtn.setDisable(false);
LOGGER.info("copying files done!");
diff --git a/src/main/java/com/cemu_UI/controller/CloudController.java b/src/main/java/com/cemu_UI/controller/CloudController.java
index 3c37c94..3358eb4 100644
--- a/src/main/java/com/cemu_UI/controller/CloudController.java
+++ b/src/main/java/com/cemu_UI/controller/CloudController.java
@@ -143,7 +143,7 @@ public class CloudController {
LOGGER.info("synchronization successful!");
} catch (Exception e) {
- // TODO: handle exception
+ LOGGER.error("There was an error during syncronisation! Please open a new issue on the cemu_UI github page:", e);
}
}
});
@@ -173,12 +173,10 @@ public class CloudController {
}
if (fileToZip.isDirectory()) {
-// System.out.println("+" + zipEntryName);
for (File file : fileToZip.listFiles()) {
addDirToZipArchive(zos, file, zipEntryName);
}
} else {
-// System.out.println(" " + zipEntryName);
byte[] buffer = new byte[1024];
FileInputStream fis = new FileInputStream(fileToZip);
zos.putNextEntry(new ZipEntry(zipEntryName));
diff --git a/src/main/java/com/cemu_UI/controller/UpdateController.java b/src/main/java/com/cemu_UI/controller/UpdateController.java
index c5a81d3..a7d69be 100644
--- a/src/main/java/com/cemu_UI/controller/UpdateController.java
+++ b/src/main/java/com/cemu_UI/controller/UpdateController.java
@@ -40,7 +40,6 @@ import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonArray;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
-
import javafx.application.Platform;
public class UpdateController implements Runnable {
@@ -140,15 +139,15 @@ public class UpdateController implements Runnable {
LOGGER.info("download link: " + browserDownloadUrl);
try {
// open new Http connection, ProgressMonitorInputStream for downloading the data
- HttpURLConnection conn = (HttpURLConnection) new URL(browserDownloadUrl).openConnection();
- ProgressMonitorInputStream pmis = new ProgressMonitorInputStream(null, "Downloading...", conn.getInputStream());
+ HttpURLConnection connection = (HttpURLConnection) new URL(browserDownloadUrl).openConnection();
+ ProgressMonitorInputStream pmis = new ProgressMonitorInputStream(null, "Downloading...", connection.getInputStream());
ProgressMonitor pm = pmis.getProgressMonitor();
pm.setMillisToDecideToPopup(0);
pm.setMillisToPopup(0);
- pm.setMinimum(0);// tell the progress bar that we start at the beginning of the stream
- pm.setMaximum(conn.getContentLength());// tell the progress bar the total number of bytes we are going to read.
+ pm.setMinimum(0);// set beginning of the progress bar to 0
+ pm.setMaximum(connection.getContentLength());// set the end to the file length
FileUtils.copyInputStreamToFile(pmis, new File("cemu_UI_update.jar")); // download update
- org.apache.commons.io.FileUtils.copyFile(new File("cemu_UI_update.jar"), new File("cemu_UI.jar")); // TODO rename update to old name
+ org.apache.commons.io.FileUtils.copyFile(new File("cemu_UI_update.jar"), new File("cemu_UI.jar"));
org.apache.commons.io.FileUtils.deleteQuietly(new File("cemu_UI_update.jar")); // delete update
Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again
System.exit(0); // finishes itself