From 040caad124b4ecfeb87785d8253a8a0582480df2 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 27 Dec 2017 13:50:19 +0100 Subject: [PATCH] Fixed library layout detection when adding new library --- app/src/processing/app/Base.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index d2ff00efd..baf7ab387 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -2308,8 +2308,10 @@ public class Base { } String[] headers; - if (new File(libFolder, "library.properties").exists()) { - headers = BaseNoGui.headerListFromIncludePath(UserLibrary.create(libFolder).getSrcFolder()); + File libProp = new File(libFolder, "library.properties"); + File srcFolder = new File(libFolder, "src"); + if (libProp.exists() && srcFolder.isDirectory()) { + headers = BaseNoGui.headerListFromIncludePath(srcFolder); } else { headers = BaseNoGui.headerListFromIncludePath(libFolder); }