1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Checking every candidate path when exporting, instead of assuming one is good if the other is not. Fixes #3905

This commit is contained in:
Federico Fissore 2015-10-07 15:40:34 +02:00
parent 5c7b8e6587
commit 688c406cb9

View File

@ -361,8 +361,10 @@ public class Compiler implements MessageConsumer {
Path compiledSketchPathInBuildPath = Paths.get(prefs.get("build.path"), compiledSketch); Path compiledSketchPathInBuildPath = Paths.get(prefs.get("build.path"), compiledSketch);
if (Files.exists(compiledSketchPathInSubfolder)) { if (Files.exists(compiledSketchPathInSubfolder)) {
compiledSketchPath = compiledSketchPathInSubfolder; compiledSketchPath = compiledSketchPathInSubfolder;
} else { } else if (Files.exists(compiledSketchPathInBuildPath)) {
compiledSketchPath = compiledSketchPathInBuildPath; compiledSketchPath = compiledSketchPathInBuildPath;
} else {
return;
} }
Path copyOfCompiledSketchFilePath = Paths.get(this.sketch.getFolder().getAbsolutePath(), copyOfCompiledSketch); Path copyOfCompiledSketchFilePath = Paths.get(this.sketch.getFolder().getAbsolutePath(), copyOfCompiledSketch);