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 {
11581158 PreferencesMap dict = new PreferencesMap (prefs );
11591159 dict .put ("ide_version" , "" + BaseNoGui .REVISION );
11601160
1161- String [] cmdArray ;
11621161 try {
11631162 String tmp_file = prefs .getOrExcept ("recipe.output.tmp_file" );
11641163 tmp_file = StringReplacer .replaceFromMapping (tmp_file , dict );
@@ -1168,16 +1167,7 @@ void saveHex() throws RunnerException {
11681167 File hexFile = new File (prefs .get ("build.path" ) + "/" + tmp_file );
11691168 File saveFile = new File (sketch .getFolder ().getAbsolutePath () + "/" + save_file );
11701169
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 );
11811171 } catch (Exception e ) {
11821172 throw new RunnerException (e );
11831173 }
You can’t perform that action at this time.
0 commit comments