From a17f7d1b58d79ca481433a2e8726a74e8a205301 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Fri, 2 Aug 2024 16:18:50 -0500 Subject: [PATCH] cleanup temporary files if gonzo has crashed or when user closes it --- firestar/src/main/java/Gonzo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firestar/src/main/java/Gonzo.java b/firestar/src/main/java/Gonzo.java index a3d3e39..c76212a 100644 --- a/firestar/src/main/java/Gonzo.java +++ b/firestar/src/main/java/Gonzo.java @@ -108,6 +108,9 @@ public class Gonzo { } private void CompatibilityRoutine() { + // cleanup any failed deploys to avoid scripts running when they are not supposed to be + Main.deleteDir(new File(System.getProperty("user.home") + "/.firestar/temp/")); + // create temporary working area for asset dump new File(System.getProperty("user.home") + "/.firestar/temp/").mkdirs(); @@ -349,6 +352,7 @@ public class Gonzo { @Override public void windowClosing(WindowEvent e) { + Main.deleteDir(new File(System.getProperty("user.home") + "/.firestar/temp/")); invoker.wrapUpDeployment(); e.getWindow().dispose(); }