File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
arduino-core/src/processing/app/debug Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -1158,7 +1158,6 @@ void saveHex() throws RunnerException {
1158
1158
PreferencesMap dict = new PreferencesMap (prefs );
1159
1159
dict .put ("ide_version" , "" + BaseNoGui .REVISION );
1160
1160
1161
- String [] cmdArray ;
1162
1161
try {
1163
1162
String tmp_file = prefs .getOrExcept ("recipe.output.tmp_file" );
1164
1163
tmp_file = StringReplacer .replaceFromMapping (tmp_file , dict );
@@ -1168,16 +1167,7 @@ void saveHex() throws RunnerException {
1168
1167
File hexFile = new File (prefs .get ("build.path" ) + "/" + tmp_file );
1169
1168
File saveFile = new File (sketch .getFolder ().getAbsolutePath () + "/" + save_file );
1170
1169
1171
- FileReader in = new FileReader (hexFile );
1172
- FileWriter out = new FileWriter (saveFile );
1173
-
1174
- int c ;
1175
- while ((c = in .read ()) != -1 )
1176
- out .write (c );
1177
-
1178
- in .close ();
1179
- out .close ();
1180
-
1170
+ FileUtils .copyFile (hexFile , saveFile );
1181
1171
} catch (Exception e ) {
1182
1172
throw new RunnerException (e );
1183
1173
}
You can’t perform that action at this time.
0 commit comments