mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
added an additional attempt to remove the temporary directory
This commit is contained in:
@@ -31,6 +31,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* A simple settings container that wraps the dependencycheck.properties file.
|
||||
@@ -364,6 +365,14 @@ public final class Settings {
|
||||
public static void cleanup(boolean deleteTemporary) {
|
||||
if (deleteTemporary && tempDirectory != null && tempDirectory.exists()) {
|
||||
FileUtils.delete(tempDirectory);
|
||||
if (tempDirectory.exists()) {
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException ex) {
|
||||
//ignore
|
||||
}
|
||||
FileUtils.delete(tempDirectory);
|
||||
}
|
||||
}
|
||||
try {
|
||||
localSettings.remove();
|
||||
|
||||
Reference in New Issue
Block a user