30
30
package builder
31
31
32
32
import (
33
- "arduino.cc/builder/constants"
34
- "arduino.cc/builder/i18n"
35
- "arduino.cc/builder/types"
36
- "arduino.cc/builder/utils"
37
33
"io/ioutil"
38
34
"os"
39
35
"path/filepath"
40
36
"sort"
41
37
"strings"
38
+
39
+ "arduino.cc/builder/constants"
40
+ "arduino.cc/builder/i18n"
41
+ "arduino.cc/builder/types"
42
+ "arduino.cc/builder/utils"
42
43
)
43
44
44
45
type SketchLoader struct {}
@@ -91,7 +92,7 @@ func collectAllSketchFiles(from string) ([]string, error) {
91
92
// Source files in the root are compiled, non-recursively. This
92
93
// is the only place where .ino files can be present.
93
94
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 */ )
95
96
if err != nil {
96
97
return nil , i18n .WrapError (err )
97
98
}
@@ -101,7 +102,7 @@ func collectAllSketchFiles(from string) ([]string, error) {
101
102
srcPath := filepath .Join (from , constants .SKETCH_FOLDER_SRC )
102
103
if info , err := os .Stat (srcPath ); err == nil && info .IsDir () {
103
104
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 */ )
105
106
}
106
107
return filePaths , i18n .WrapError (err )
107
108
}
0 commit comments