Skip to content

Commit dce3496

Browse files
committed
Copy the whole sketch into tmp folder
See arduino/Arduino#5186 Signed-off-by: Cristian Maglie <[email protected]>
1 parent d0ac261 commit dce3496

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Diff for: src/arduino.cc/builder/sketch_loader.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,11 @@ func collectAllSketchFiles(from string) ([]string, error) {
9292
// Source files in the root are compiled, non-recursively. This
9393
// is the only place where .ino files can be present.
9494
rootExtensions := func(ext string) bool { return MAIN_FILE_VALID_EXTENSIONS[ext] || ADDITIONAL_FILE_VALID_EXTENSIONS[ext] }
95-
err := utils.FindFilesInFolder(&filePaths, from, rootExtensions, false /* recurse */)
95+
err := utils.FindFilesInFolder(&filePaths, from, rootExtensions, true /* recurse */)
9696
if err != nil {
9797
return nil, i18n.WrapError(err)
9898
}
9999

100-
// The "src/" subdirectory of a sketch is compiled recursively
101-
// (but .ino files are *not* compiled)
102-
srcPath := filepath.Join(from, constants.SKETCH_FOLDER_SRC)
103-
if info, err := os.Stat(srcPath); err == nil && info.IsDir() {
104-
srcExtensions := func(ext string) bool { return ADDITIONAL_FILE_VALID_EXTENSIONS[ext] }
105-
err = utils.FindFilesInFolder(&filePaths, srcPath, srcExtensions, true /* recurse */)
106-
}
107100
return filePaths, i18n.WrapError(err)
108101
}
109102

0 commit comments

Comments
 (0)