mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 01:55:53 +01:00
fix: prevent cluttering temp files, delete BRUT temp files on close
This commit is contained in:
parent
258fb82fe2
commit
cabf1d5cad
@ -122,6 +122,7 @@ public class OS {
|
|||||||
public static File createTempDirectory() throws BrutException {
|
public static File createTempDirectory() throws BrutException {
|
||||||
try {
|
try {
|
||||||
File tmp = File.createTempFile("BRUT", null);
|
File tmp = File.createTempFile("BRUT", null);
|
||||||
|
tmp.deleteOnExit();
|
||||||
if (!tmp.delete()) {
|
if (!tmp.delete()) {
|
||||||
throw new BrutException("Could not delete tmp file: " + tmp.getAbsolutePath());
|
throw new BrutException("Could not delete tmp file: " + tmp.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user