Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Fix libraries issues on updates
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldieeins committed Jun 16, 2024
1 parent d25d775 commit 969214a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions application-main/src/main/java/com/zyneonstudios/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public static void main(String[] args) {
splash = new ZyneonSplash();
splash.setVisible(true);
FileUtil.deleteFolder(new File(getDirectoryPath()+"temp/"));
version = "2024.5";
version = "2024.6.1";
ArrayList<String> arguments = new ArrayList<>();
String name = "Protonium";
String name = "Protonium²";
architecture = getArchitecture();
logger = new ZLogger("ZYNEON");
String fullVersion = version+" ▪ "+name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public static boolean update(ReadableInstance localInstance) {
File pack = new File(path + "meta/pack.zip");
File mods = new File(path + "/mods/");
File libraries = new File(path + "/libraries/");
Main.getLogger().log("[ZYNDEX] Deleting old libraries...");
try {
FileUtil.deleteFolder(libraries);
} catch (Exception ignore) {}
if(!libraries.exists()) {
Main.getLogger().log("[ZYNDEX] Old libraries deleted!");
}
Main.getLogger().log("[ZYNDEX] Checking if old pack file exists...");
if (pack.exists()) {
Main.getLogger().log("[ZYNDEX] Found old pack file!");
Expand All @@ -99,13 +106,6 @@ public static boolean update(ReadableInstance localInstance) {
Main.getLogger().log("[ZYNDEX] Downloading new pack file...");
pack = FileUtil.downloadFile(onlineInstance.getDownloadUrl(), path + "meta/pack.zip");
Main.getLogger().log("[ZYNDEX] New pack file downloaded!");

Main.getLogger().log("[ZYNDEX] Deleting old libraries...");
if (!libraries.mkdirs()) {
FileUtil.deleteFolder(libraries);
}
Main.getLogger().log("[ZYNDEX] Old libraries deleted!");

Main.getLogger().log("[ZYNDEX] Deleting old mods...");
if (!mods.mkdirs()) {
FileUtil.deleteFolder(mods);
Expand Down

0 comments on commit 969214a

Please sign in to comment.