1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

Fixed library layout detection when adding new library

This commit is contained in:
Cristian Maglie 2017-12-27 13:50:19 +01:00
parent e896595214
commit 040caad124

View File

@ -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);
}