cleanup temporary files if gonzo has crashed or when user closes it

This commit is contained in:
Downforce Agent 2024-08-02 16:18:50 -05:00
parent efbf8585d2
commit a17f7d1b58

View File

@ -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();
}