mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Slightly simplified scanLibrary method
This commit is contained in:
parent
2374d9d1bd
commit
31de5b61c1
@ -169,8 +169,6 @@ public class LibrariesIndexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
|
private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
|
||||||
boolean readOnly = (folderDesc.location == Location.SKETCHBOOK);
|
|
||||||
|
|
||||||
// A library is considered "legacy" if it doesn't contains
|
// A library is considered "legacy" if it doesn't contains
|
||||||
// a file called "library.properties"
|
// a file called "library.properties"
|
||||||
File check = new File(folderDesc.folder, "library.properties");
|
File check = new File(folderDesc.folder, "library.properties");
|
||||||
@ -201,7 +199,7 @@ public class LibrariesIndexer {
|
|||||||
lib.setTypes(foundLib.getTypes());
|
lib.setTypes(foundLib.getTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readOnly && lib.getTypes() == null && !lib.getDeclaredTypes().isEmpty()) {
|
if (lib.getTypes() == null && folderDesc.location == Location.SKETCHBOOK) {
|
||||||
lib.setTypes(lib.getDeclaredTypes());
|
lib.setTypes(lib.getDeclaredTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user