mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Some ArchiveExtractor bugs fixed and its code formatted
This commit is contained in:
@ -44,6 +44,17 @@ import cc.arduino.utils.Progress;
|
||||
|
||||
public class LibraryInstaller {
|
||||
|
||||
private static final String LIBRARY_INDEX_URL;
|
||||
|
||||
static {
|
||||
String extenalLibraryIndexUrl = System.getProperty("LIBRARY_INDEX_URL");
|
||||
if (extenalLibraryIndexUrl != null && !"".equals(extenalLibraryIndexUrl)) {
|
||||
LIBRARY_INDEX_URL = extenalLibraryIndexUrl;
|
||||
} else {
|
||||
LIBRARY_INDEX_URL = "http://arduino.cc/download.php?f=/libraries/library_index.json";
|
||||
}
|
||||
}
|
||||
|
||||
private LibrariesIndexer indexer;
|
||||
private File stagingFolder;
|
||||
private DownloadableContributionsDownloader downloader;
|
||||
@ -63,7 +74,7 @@ public class LibraryInstaller {
|
||||
final MultiStepProgress progress = new MultiStepProgress(2);
|
||||
|
||||
// Step 1: Download index
|
||||
URL url = new URL("http://arduino.cc/download.php?f=/libraries/library_index.json");
|
||||
URL url = new URL(LIBRARY_INDEX_URL);
|
||||
File outputFile = indexer.getIndexFile();
|
||||
File tmpFile = new File(outputFile.getAbsolutePath() + ".tmp");
|
||||
try {
|
||||
|
Reference in New Issue
Block a user