From 412b6d1bf30f2cadbf873a5fadbb98808c354722 Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Wed, 3 Jul 2019 18:38:08 +0200 Subject: [PATCH] Fix download package index from external sources --- .../contributions/DownloadableContributionsDownloader.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java b/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java index a0b811ba1..7e06fc727 100644 --- a/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java +++ b/arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java @@ -170,6 +170,8 @@ public class DownloadableContributionsDownloader { downloadedFilesAccumulator.remove(packageIndex.getName()); } } else { + // Move the package index to the destination when the signature is not necessary + Files.move(packageIndexTemp.toPath(), packageIndex.toPath(), StandardCopyOption.REPLACE_EXISTING); log.info("The domain is not selected to verify the signature. packageIndex: {}", packageIndexUrl); } } catch (Exception e) {