mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 16:23:37 +01:00
fixed bug related to temp files
Former-commit-id: 3d1a5c6d30411ab026b2f072a8aee25106bf9691
This commit is contained in:
@@ -337,7 +337,7 @@ public final class Settings {
|
||||
*/
|
||||
public static void cleanup(boolean deleteTemporary) {
|
||||
if (deleteTemporary && tempDirectory != null && tempDirectory.exists()) {
|
||||
FileUtils.delete(tempDirectory);
|
||||
//FileUtils.delete(tempDirectory);
|
||||
}
|
||||
try {
|
||||
localSettings.remove();
|
||||
@@ -586,15 +586,14 @@ public final class Settings {
|
||||
* @throws java.io.IOException thrown if the temporary directory does not exist and cannot be created
|
||||
*/
|
||||
public static File getTempDirectory() throws IOException {
|
||||
final File tmpDir = new File(Settings.getString(Settings.KEYS.TEMP_DIRECTORY, System.getProperty("java.io.tmpdir")));
|
||||
final File tmpDir = new File(Settings.getString(Settings.KEYS.TEMP_DIRECTORY, System.getProperty("java.io.tmpdir")), "dctemp");
|
||||
if (!tmpDir.exists()) {
|
||||
if (!tmpDir.mkdirs()) {
|
||||
final String msg = String.format("Unable to make a temporary folder '%s'", tmpDir.getPath());
|
||||
throw new IOException(msg);
|
||||
} else {
|
||||
tempDirectory = tmpDir;
|
||||
}
|
||||
}
|
||||
tempDirectory = tmpDir;
|
||||
return tmpDir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user