1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

Slightly simplified scanLibrary method

This commit is contained in:
Cristian Maglie 2018-01-18 17:21:17 +01:00
parent 2374d9d1bd
commit 31de5b61c1

View File

@ -169,8 +169,6 @@ public class LibrariesIndexer {
}
private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
boolean readOnly = (folderDesc.location == Location.SKETCHBOOK);
// A library is considered "legacy" if it doesn't contains
// a file called "library.properties"
File check = new File(folderDesc.folder, "library.properties");
@ -201,7 +199,7 @@ public class LibrariesIndexer {
lib.setTypes(foundLib.getTypes());
}
if (readOnly && lib.getTypes() == null && !lib.getDeclaredTypes().isEmpty()) {
if (lib.getTypes() == null && folderDesc.location == Location.SKETCHBOOK) {
lib.setTypes(lib.getDeclaredTypes());
}