mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Added empty library_index.json if default is not available.
This commit is contained in:
committed by
Federico Fissore
parent
98fec7222b
commit
12a2d872d6
@ -620,6 +620,17 @@ public class BaseNoGui {
|
|||||||
loadContributedHardware(indexer);
|
loadContributedHardware(indexer);
|
||||||
|
|
||||||
librariesIndexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder());
|
librariesIndexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder());
|
||||||
|
File librariesIndexFile = librariesIndexer.getIndexFile();
|
||||||
|
if (!librariesIndexFile.isFile()) {
|
||||||
|
try {
|
||||||
|
// Otherwise create an empty packages index
|
||||||
|
FileOutputStream out = new FileOutputStream(librariesIndexFile);
|
||||||
|
out.write("{ \"libraries\" : [ ] }".getBytes());
|
||||||
|
out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
librariesIndexer.parseIndex();
|
librariesIndexer.parseIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user