Skip to content

Commit 1c8a4e9

Browse files
bitroncmaglie
authored andcommitted
Added sketch structure check to the build method of Compile.
1 parent 5db851c commit 1c8a4e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/processing/app/debug/Compiler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public interface ProgressListener {
8383
private ProgressListener progressListener;
8484

8585
static public String build(SketchData data, String buildPath, File tempBuildFolder, ProgressListener progListener, boolean verbose) throws RunnerException {
86+
if (!SketchData.checkSketchFile(data.getPrimaryFile()))
87+
BaseNoGui.showError(_("Bad file selected"),
88+
_("Bad sketch primary file or bad sketck directory structure"), null);
89+
8690
String primaryClassName = data.getName() + ".cpp";
8791
Compiler compiler = new Compiler(data, buildPath, primaryClassName);
8892
File buildPrefsFile = new File(buildPath, BUILD_PREFS_FILE);

0 commit comments

Comments
 (0)