From 5a004b6744bd30319d25a8f313e13a61d90d8c9f Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Wed, 8 May 2024 14:15:00 -0500 Subject: [PATCH] to avoid more dumdums --- src/Gonzo.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Gonzo.java b/src/Gonzo.java index c8ee28a..5bb11b1 100644 --- a/src/Gonzo.java +++ b/src/Gonzo.java @@ -269,10 +269,20 @@ public class Gonzo { } // cleanup - System.out.println("created export folder: " + new File(Main.outpath).mkdirs()); - if (!Main.windows) {System.out.println("moved file to destination: " + new File(System.getProperty("user.home") + "/.firestar/temp/" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget)));} - else {System.out.println("moved file to destination: " + new File(System.getProperty("user.home") + "\\.firestar\\temp\\" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget)));} System.out.println("file should be located at " + Main.outpath + oArcTarget); - //try {TimeUnit.SECONDS.sleep(2);} catch (InterruptedException e) {} + boolean one = new File(Main.outpath).mkdirs(); + boolean two; + System.out.println("created export folder: " + one); + if (!Main.windows) {two = new File(System.getProperty("user.home") + "/.firestar/temp/" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget));} + else {two = new File(System.getProperty("user.home") + "\\.firestar\\temp\\" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget));} + System.out.println("moved file to destination: " + two); + if (one && two) {System.out.println("file should be located at " + Main.outpath + oArcTarget);} else { + System.out.println("CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!"); + consoleDisplay.append("CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!"); + JOptionPane.showMessageDialog(this.frame, "CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!", "Fatal Error", JOptionPane.ERROR_MESSAGE); + frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + AllowExit(); + return; + } try { Process p; if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","rm -rf " + System.getProperty("user.home") + "/.firestar/temp/"});} // Scary!