mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Better naming and use of File constructor (avoids hardcoding system dependent path separator)
This commit is contained in:
parent
90a533b82c
commit
74ace6674a
@ -1159,15 +1159,15 @@ public class Compiler implements MessageConsumer {
|
|||||||
dict.put("ide_version", "" + BaseNoGui.REVISION);
|
dict.put("ide_version", "" + BaseNoGui.REVISION);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String tmp_file = prefs.getOrExcept("recipe.output.tmp_file");
|
String compiledSketch = prefs.getOrExcept("recipe.output.tmp_file");
|
||||||
tmp_file = StringReplacer.replaceFromMapping(tmp_file, dict);
|
compiledSketch = StringReplacer.replaceFromMapping(compiledSketch, dict);
|
||||||
String save_file = prefs.getOrExcept("recipe.output.save_file");
|
String copyOfCompiledSketch = prefs.getOrExcept("recipe.output.save_file");
|
||||||
save_file = StringReplacer.replaceFromMapping(save_file, dict);
|
copyOfCompiledSketch = StringReplacer.replaceFromMapping(copyOfCompiledSketch, dict);
|
||||||
|
|
||||||
File hexFile = new File(prefs.get("build.path") + "/" + tmp_file);
|
File compiledSketchFile = new File(prefs.get("build.path"), compiledSketch);
|
||||||
File saveFile = new File(sketch.getFolder().getAbsolutePath() + "/" + save_file);
|
File copyOfCompiledSketchFile = new File(sketch.getFolder(), copyOfCompiledSketch);
|
||||||
|
|
||||||
FileUtils.copyFile(hexFile, saveFile);
|
FileUtils.copyFile(compiledSketchFile, copyOfCompiledSketchFile);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RunnerException(e);
|
throw new RunnerException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user