From d57f1837858e1f112482239ed60b639328d257d6 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Sun, 30 Jun 2024 06:55:29 -0500 Subject: [PATCH] windows compatibility fixes v3 --- src/Gonzo.java | 2 +- src/MissPiggy.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Gonzo.java b/src/Gonzo.java index 445f634..d6e0b90 100644 --- a/src/Gonzo.java +++ b/src/Gonzo.java @@ -155,7 +155,7 @@ public class Gonzo { try { System.out.println("Firestar is extracting " + m.friendlyName + " by " + m.author); consoleDisplay.append("Firestar is extracting " + m.friendlyName + " by " + m.author + "\n"); - new ZipFile(System.getProperty("user.home") + "/.firestar/mods/" + m.path).extractAll(System.getProperty("user.home") + "/.firestar/temp/"); + new ZipFile(System.getProperty("user.home") + "/.firestar/mods/" + m.path.trim()).extractAll(System.getProperty("user.home") + "/.firestar/temp/"); if (new File(System.getProperty("user.home") + "/.firestar/temp/delete.txt").isFile()) { System.out.println("Firestar is deleting files that conflict with " + m.friendlyName + " by " + m.author); diff --git a/src/MissPiggy.java b/src/MissPiggy.java index acfc174..2be6a5f 100644 --- a/src/MissPiggy.java +++ b/src/MissPiggy.java @@ -244,7 +244,7 @@ public class MissPiggy implements ActionListener { System.out.println("Initializing blacklist from file with length of " + bListArray.length + " units"); //debug for (String s : bListArray) { for (Main.Mod m : Main.Mods) { - if (s.equals(m.path)) { + if (s.trim().equals(m.path.trim())) { m.enabled = false; } } @@ -474,7 +474,7 @@ public class MissPiggy implements ActionListener { try { //debug - File pathReference = new File(System.getProperty("user.home") + "/.firestar/mods/" + Main.Mods.get(modList.getSelectedIndex()).path); + File pathReference = new File(System.getProperty("user.home") + "/.firestar/mods/" + Main.Mods.get(modList.getSelectedIndex()).path.trim()); DecimalFormat df = new DecimalFormat("##.##"); df.setRoundingMode(RoundingMode.UP); float modFileSize = pathReference.length(); //precise units