1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +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);
if (Files.exists(compiledSketchPathInSubfolder)) {
compiledSketchPath = compiledSketchPathInSubfolder;
} else {
} else if (Files.exists(compiledSketchPathInBuildPath)) {
compiledSketchPath = compiledSketchPathInBuildPath;
} else {
return;
}
Path copyOfCompiledSketchFilePath = Paths.get(this.sketch.getFolder().getAbsolutePath(), copyOfCompiledSketch);