3030package builder
3131
3232import (
33- "arduino.cc/builder/constants"
34- "arduino.cc/builder/i18n"
35- "arduino.cc/builder/types"
36- "arduino.cc/builder/utils"
3733 "io/ioutil"
3834 "os"
3935 "path/filepath"
4036 "sort"
4137 "strings"
38+
39+ "arduino.cc/builder/constants"
40+ "arduino.cc/builder/i18n"
41+ "arduino.cc/builder/types"
42+ "arduino.cc/builder/utils"
4243)
4344
4445type SketchLoader struct {}
@@ -91,7 +92,7 @@ func collectAllSketchFiles(from string) ([]string, error) {
9192 // Source files in the root are compiled, non-recursively. This
9293 // is the only place where .ino files can be present.
9394 rootExtensions := func (ext string ) bool { return MAIN_FILE_VALID_EXTENSIONS [ext ] || ADDITIONAL_FILE_VALID_EXTENSIONS [ext ] }
94- err := utils .FindFilesInFolder (& filePaths , from , rootExtensions , /* recurse */ false )
95+ err := utils .FindFilesInFolder (& filePaths , from , rootExtensions , false /* recurse */ )
9596 if err != nil {
9697 return nil , i18n .WrapError (err )
9798 }
@@ -101,7 +102,7 @@ func collectAllSketchFiles(from string) ([]string, error) {
101102 srcPath := filepath .Join (from , constants .SKETCH_FOLDER_SRC )
102103 if info , err := os .Stat (srcPath ); err == nil && info .IsDir () {
103104 srcExtensions := func (ext string ) bool { return ADDITIONAL_FILE_VALID_EXTENSIONS [ext ] }
104- err = utils .FindFilesInFolder (& filePaths , srcPath , srcExtensions , /* recurse */ true )
105+ err = utils .FindFilesInFolder (& filePaths , srcPath , srcExtensions , true /* recurse */ )
105106 }
106107 return filePaths , i18n .WrapError (err )
107108}
0 commit comments