Skip to content

Commit 3c5dbe6

Browse files
author
Mattia Bertorello
committed
Parse the old library index file also when the signature verify fail
1 parent 636f930 commit 3c5dbe6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ public synchronized void updateIndex(ProgressListener progressListener) throws E
9393
if (libraryIndexTemp.length() > 0) {
9494
Files.move(libraryIndexTemp.toPath(), outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
9595
}
96-
97-
// Step 2: Parse index
98-
BaseNoGui.librariesIndexer.parseIndex();
99-
100-
// Step 3: Rescan index
101-
rescanLibraryIndex(progress, progressListener);
10296
} else {
10397
FileDownloader.invalidateFiles(libraryGzURL, libraryURL, signatureUrl);
10498
log.error("Fail to verify the signature of {} the cached files have been removed", libraryURL);
@@ -107,6 +101,12 @@ public synchronized void updateIndex(ProgressListener progressListener) throws E
107101
log.info("The domain is not selected to verify the signature. library index: {}", signatureUrl);
108102
}
109103

104+
// Step 2: Parse index
105+
BaseNoGui.librariesIndexer.parseIndex();
106+
107+
// Step 3: Rescan index
108+
rescanLibraryIndex(progress, progressListener);
109+
110110
}
111111

112112
public synchronized void install(ContributedLibrary lib, Optional<ContributedLibrary> mayReplacedLib, ProgressListener progressListener) throws Exception {

0 commit comments

Comments
 (0)