File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3030package builder
3131
3232import (
33+ "os"
34+ "path/filepath"
35+
3336 "arduino.cc/builder/constants"
3437 "arduino.cc/builder/i18n"
3538 "arduino.cc/builder/types"
3639 "arduino.cc/builder/utils"
37- "path/filepath"
3840)
3941
4042type ContainerFindIncludes struct {}
@@ -53,7 +55,11 @@ func (s *ContainerFindIncludes) Run(ctx *types.Context) error {
5355 }
5456
5557 foldersWithSources := ctx .FoldersWithSourceFiles
56- foldersWithSources .Push (types.SourceFolder {Folder : ctx .SketchBuildPath , Recurse : true })
58+ foldersWithSources .Push (types.SourceFolder {Folder : ctx .SketchBuildPath , Recurse : false })
59+ srcSubfolderPath := filepath .Join (ctx .SketchBuildPath , constants .SKETCH_FOLDER_SRC )
60+ if info , err := os .Stat (srcSubfolderPath ); err == nil && info .IsDir () {
61+ foldersWithSources .Push (types.SourceFolder {Folder : srcSubfolderPath , Recurse : true })
62+ }
5763 if len (ctx .ImportedLibraries ) > 0 {
5864 for _ , library := range ctx .ImportedLibraries {
5965 sourceFolders := types .LibraryToSourceFolder (library )
You can’t perform that action at this time.
0 commit comments