From 5fbfc33b473eaee4192fc8771c36a6d8d2676cf1 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Thu, 18 Jul 2024 06:31:45 -0500 Subject: [PATCH] cleanup temp files when disposing clifford --- firestar/src/main/java/Clifford.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firestar/src/main/java/Clifford.java b/firestar/src/main/java/Clifford.java index 68e9a1d..31b6ced 100644 --- a/firestar/src/main/java/Clifford.java +++ b/firestar/src/main/java/Clifford.java @@ -141,6 +141,7 @@ public class Clifford implements ActionListener { @Override public void windowClosing(WindowEvent e) { + Main.deleteDir(new File(Main.inpath + "temp/")); // soundtrack gen invoker.setEnabled(true); e.getWindow().dispose(); } @@ -150,6 +151,7 @@ public class Clifford implements ActionListener { @Override public void actionPerformed(ActionEvent actionEvent) { if (actionEvent.getSource() == cancelbtn) { + Main.deleteDir(new File(Main.inpath + "temp/")); // soundtrack gen invoker.setEnabled(true); frame.dispose(); } else if (actionEvent.getSource() == savebtn && !creating) { @@ -228,6 +230,7 @@ public class Clifford implements ActionListener { return; } JOptionPane.showMessageDialog(frame, "Mod file created", "Success", JOptionPane.INFORMATION_MESSAGE); + Main.deleteDir(new File(Main.inpath + "temp/")); // soundtrack gen invoker.setEnabled(true); frame.dispose(); }