From cabf1d5cad828a39fea7b15814b6ab4aa6eae6e3 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Fri, 6 Apr 2018 11:12:09 -0400 Subject: [PATCH] fix: prevent cluttering temp files, delete BRUT temp files on close --- brut.j.util/src/main/java/brut/util/OS.java | 1 + 1 file changed, 1 insertion(+) diff --git a/brut.j.util/src/main/java/brut/util/OS.java b/brut.j.util/src/main/java/brut/util/OS.java index 5e73bea3..f5f69dbe 100644 --- a/brut.j.util/src/main/java/brut/util/OS.java +++ b/brut.j.util/src/main/java/brut/util/OS.java @@ -122,6 +122,7 @@ public class OS { public static File createTempDirectory() throws BrutException { try { File tmp = File.createTempFile("BRUT", null); + tmp.deleteOnExit(); if (!tmp.delete()) { throw new BrutException("Could not delete tmp file: " + tmp.getAbsolutePath()); }