Temp File API Update
Refactoring & implemented automatic decompiler cleanup flag
This commit is contained in:
parent
ed59212c6f
commit
5bac732ea9
|
@ -111,7 +111,7 @@ public class FernFlowerDecompiler extends AbstractDecompiler
|
||||||
{
|
{
|
||||||
//cleanup temp files
|
//cleanup temp files
|
||||||
if(tempFile != null)
|
if(tempFile != null)
|
||||||
tempFile.delete();
|
tempFile.cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
return FERNFLOWER + " " + ERROR + "! " + ExceptionUI.SEND_STACKTRACE_TO + NL + NL
|
return FERNFLOWER + " " + ERROR + "! " + ExceptionUI.SEND_STACKTRACE_TO + NL + NL
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package the.bytecode.club.bytecodeviewer.util;
|
package the.bytecode.club.bytecodeviewer.util;
|
||||||
|
|
||||||
|
import the.bytecode.club.bytecodeviewer.Constants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
@ -59,8 +61,11 @@ public class TempFile
|
||||||
createdFilePaths.add(file.getAbsolutePath());
|
createdFilePaths.add(file.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete()
|
public void cleanup()
|
||||||
{
|
{
|
||||||
|
if(!Constants.DECOMPILERS_AUTOMATICALLY_CLEANUP)
|
||||||
|
return;
|
||||||
|
|
||||||
//delete all the items
|
//delete all the items
|
||||||
for(String path : createdFilePaths)
|
for(String path : createdFilePaths)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user