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);
|
||||
|
||||
try {
|
||||
String tmp_file = prefs.getOrExcept("recipe.output.tmp_file");
|
||||
tmp_file = StringReplacer.replaceFromMapping(tmp_file, dict);
|
||||
String save_file = prefs.getOrExcept("recipe.output.save_file");
|
||||
save_file = StringReplacer.replaceFromMapping(save_file, dict);
|
||||
String compiledSketch = prefs.getOrExcept("recipe.output.tmp_file");
|
||||
compiledSketch = StringReplacer.replaceFromMapping(compiledSketch, dict);
|
||||
String copyOfCompiledSketch = prefs.getOrExcept("recipe.output.save_file");
|
||||
copyOfCompiledSketch = StringReplacer.replaceFromMapping(copyOfCompiledSketch, dict);
|
||||
|
||||
File hexFile = new File(prefs.get("build.path") + "/" + tmp_file);
|
||||
File saveFile = new File(sketch.getFolder().getAbsolutePath() + "/" + save_file);
|
||||
File compiledSketchFile = new File(prefs.get("build.path"), compiledSketch);
|
||||
File copyOfCompiledSketchFile = new File(sketch.getFolder(), copyOfCompiledSketch);
|
||||
|
||||
FileUtils.copyFile(hexFile, saveFile);
|
||||
FileUtils.copyFile(compiledSketchFile, copyOfCompiledSketchFile);
|
||||
} catch (Exception e) {
|
||||
throw new RunnerException(e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user