Skip to content

Commit 31de5b6

Browse files
committed
Slightly simplified scanLibrary method
1 parent 2374d9d commit 31de5b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ private void scanInstalledLibraries(UserLibraryFolder folderDesc) {
169169
}
170170

171171
private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
172-
boolean readOnly = (folderDesc.location == Location.SKETCHBOOK);
173-
174172
// A library is considered "legacy" if it doesn't contains
175173
// a file called "library.properties"
176174
File check = new File(folderDesc.folder, "library.properties");
@@ -201,7 +199,7 @@ private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
201199
lib.setTypes(foundLib.getTypes());
202200
}
203201

204-
if (readOnly && lib.getTypes() == null && !lib.getDeclaredTypes().isEmpty()) {
202+
if (lib.getTypes() == null && folderDesc.location == Location.SKETCHBOOK) {
205203
lib.setTypes(lib.getDeclaredTypes());
206204
}
207205

0 commit comments

Comments
 (0)