1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Parse the old library index file also when the signature verify fail

This commit is contained in:
Mattia Bertorello 2019-07-18 10:27:20 +02:00
parent 636f93058b
commit 3c5dbe6f9d
No known key found for this signature in database
GPG Key ID: CE1FB2BE91770F24

View File

@ -93,12 +93,6 @@ public class LibraryInstaller {
if (libraryIndexTemp.length() > 0) {
Files.move(libraryIndexTemp.toPath(), outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
// Step 2: Parse index
BaseNoGui.librariesIndexer.parseIndex();
// Step 3: Rescan index
rescanLibraryIndex(progress, progressListener);
} else {
FileDownloader.invalidateFiles(libraryGzURL, libraryURL, signatureUrl);
log.error("Fail to verify the signature of {} the cached files have been removed", libraryURL);
@ -107,6 +101,12 @@ public class LibraryInstaller {
log.info("The domain is not selected to verify the signature. library index: {}", signatureUrl);
}
// Step 2: Parse index
BaseNoGui.librariesIndexer.parseIndex();
// Step 3: Rescan index
rescanLibraryIndex(progress, progressListener);
}
public synchronized void install(ContributedLibrary lib, Optional<ContributedLibrary> mayReplacedLib, ProgressListener progressListener) throws Exception {