Skip to content

Commit 040caad

Browse files
committed
Fixed library layout detection when adding new library
1 parent e896595 commit 040caad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,8 +2308,10 @@ public void handleAddLibrary() {
23082308
}
23092309

23102310
String[] headers;
2311-
if (new File(libFolder, "library.properties").exists()) {
2312-
headers = BaseNoGui.headerListFromIncludePath(UserLibrary.create(libFolder).getSrcFolder());
2311+
File libProp = new File(libFolder, "library.properties");
2312+
File srcFolder = new File(libFolder, "src");
2313+
if (libProp.exists() && srcFolder.isDirectory()) {
2314+
headers = BaseNoGui.headerListFromIncludePath(srcFolder);
23132315
} else {
23142316
headers = BaseNoGui.headerListFromIncludePath(libFolder);
23152317
}

0 commit comments

Comments
 (0)