mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
updated to delete newly created file prior to attempting to copy a new file into its location
Former-commit-id: f170e09f4290b746808e0400a106ea9d33b992d6
This commit is contained in:
@@ -112,7 +112,10 @@ public abstract class AbstractSuppressionAnalyzer extends AbstractAnalyzer {
|
||||
final Pattern uriRx = Pattern.compile("^(https?|file)\\:.*", Pattern.CASE_INSENSITIVE);
|
||||
if (uriRx.matcher(suppressionFilePath).matches()) {
|
||||
deleteTempFile = true;
|
||||
file = File.createTempFile("suppression", "xml", Settings.getTempDirectory());
|
||||
file = File.createTempFile("suppression", ".xml", Settings.getTempDirectory());
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
final URL url = new URL(suppressionFilePath);
|
||||
try {
|
||||
Downloader.fetchFile(url, file, false);
|
||||
|
||||
Reference in New Issue
Block a user