Skip to content

Commit 7121e35

Browse files
author
jantje
committed
Also add libraries to projects on creation for examples X Y
What I mean is that if you create a sketch from a example that is in the folder lib/examples/X/Y/sketch.ino the library was not attached at sketch creation and now it is.
1 parent 828d6d4 commit 7121e35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

io.sloeber.core/src/io/sloeber/core/api/CodeDescriptor.java

+3
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ public static String getLibraryName(Path examplePath) {
255255
if ("libraries".equalsIgnoreCase(examplePath.removeLastSegments(4).lastSegment())) {
256256
return examplePath.removeLastSegments(3).lastSegment();
257257
}
258+
if ("libraries".equalsIgnoreCase(examplePath.removeLastSegments(5).lastSegment())) {
259+
return examplePath.removeLastSegments(4).lastSegment();
260+
}
258261
return examplePath.removeLastSegments(2).lastSegment();
259262
}
260263
}

0 commit comments

Comments
 (0)