mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Merge pull request #1853 from PaulStoffregen/master
If 2 libs have same .h file, use the lib with same dir name
This commit is contained in:
commit
b78fcf5139
@ -1245,6 +1245,13 @@ public class Base {
|
|||||||
String packages[] =
|
String packages[] =
|
||||||
Compiler.headerListFromIncludePath(subfolder.getAbsolutePath());
|
Compiler.headerListFromIncludePath(subfolder.getAbsolutePath());
|
||||||
for (String pkg : packages) {
|
for (String pkg : packages) {
|
||||||
|
File old = importToLibraryTable.get(pkg);
|
||||||
|
if (old != null) {
|
||||||
|
// If a library was already found with this header, keep it if
|
||||||
|
// the library's directory name matches the header name.
|
||||||
|
String name = pkg.substring(0, pkg.length() - 2);
|
||||||
|
if (old.getPath().endsWith(name)) continue;
|
||||||
|
}
|
||||||
importToLibraryTable.put(pkg, subfolder);
|
importToLibraryTable.put(pkg, subfolder);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user