Skip to content

Commit

Permalink
Folders outside sketch/.. and sketch/src/.. are not used for lib disc…
Browse files Browse the repository at this point in the history
…overy

Signed-off-by: Cristian Maglie <c.maglie@arduino.cc>
  • Loading branch information
cmaglie committed Aug 1, 2016
1 parent 89518a4 commit 7770e7e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/arduino.cc/builder/container_find_includes.go
Expand Up @@ -30,11 +30,13 @@
package builder

import (
"os"
"path/filepath"

"arduino.cc/builder/constants"
"arduino.cc/builder/i18n"
"arduino.cc/builder/types"
"arduino.cc/builder/utils"
"path/filepath"
)

type ContainerFindIncludes struct{}
Expand All @@ -53,7 +55,11 @@ func (s *ContainerFindIncludes) Run(ctx *types.Context) error {
}

foldersWithSources := ctx.FoldersWithSourceFiles
foldersWithSources.Push(types.SourceFolder{Folder: ctx.SketchBuildPath, Recurse: true})
foldersWithSources.Push(types.SourceFolder{Folder: ctx.SketchBuildPath, Recurse: false})
srcSubfolderPath := filepath.Join(ctx.SketchBuildPath, constants.SKETCH_FOLDER_SRC)
if info, err := os.Stat(srcSubfolderPath); err == nil && info.IsDir() {
foldersWithSources.Push(types.SourceFolder{Folder: srcSubfolderPath, Recurse: true})
}
if len(ctx.ImportedLibraries) > 0 {
for _, library := range ctx.ImportedLibraries {
sourceFolders := types.LibraryToSourceFolder(library)
Expand Down

0 comments on commit 7770e7e

Please sign in to comment.