fix: prevent cluttering temp files, delete BRUT temp files on close

This commit is contained in:
Connor Tumbleson 2018-04-06 11:12:09 -04:00
parent 258fb82fe2
commit cabf1d5cad

View File

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