mirror of https://github.com/noisymime/Arduino.git
Added empty library_index.json if default is not available.
This commit is contained in:
parent
98fec7222b
commit
12a2d872d6
|
@ -620,6 +620,17 @@ public class BaseNoGui {
|
|||
loadContributedHardware(indexer);
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue