mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Libraries: if missing header files, a lib doesn't even get listed. Fixes #3374
This commit is contained in:
parent
ee006271d8
commit
6558afa21d
@ -171,6 +171,10 @@ public class LibrariesIndexer {
|
||||
// Create a legacy library and exit
|
||||
LegacyUserLibrary lib = LegacyUserLibrary.create(folder);
|
||||
lib.setReadOnly(readOnly);
|
||||
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
|
||||
if (headers.length == 0) {
|
||||
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
||||
}
|
||||
installedLibraries.addOrReplace(lib);
|
||||
if (isSketchbook) {
|
||||
installedLibrariesWithDuplicates.add(lib);
|
||||
@ -183,6 +187,10 @@ public class LibrariesIndexer {
|
||||
// Create a regular library
|
||||
UserLibrary lib = UserLibrary.create(folder);
|
||||
lib.setReadOnly(readOnly);
|
||||
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
|
||||
if (headers.length == 0) {
|
||||
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
||||
}
|
||||
installedLibraries.addOrReplace(lib);
|
||||
if (isSketchbook) {
|
||||
installedLibrariesWithDuplicates.add(lib);
|
||||
|
Loading…
x
Reference in New Issue
Block a user