Skip to content

Commit 0df242f

Browse files
committed
Final tweaks.
1 parent ee5911a commit 0df242f

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

src/ESP32FSDL.java

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Author : $Author$
99
* Created By : Robert Heller
1010
* Created : Thu Apr 11 09:47:34 2019
11-
* Last Modified : <190411.1619>
11+
* Last Modified : <190412.1023>
1212
*
1313
* Description
1414
*
@@ -303,6 +303,27 @@ private void downloadAndUnpack(){
303303
}
304304

305305

306+
//load a list of all files
307+
int fileCount = 0;
308+
File dataFolder = new File(editor.getSketch().getFolder(), "data");
309+
if (!dataFolder.exists()) {
310+
dataFolder.mkdirs();
311+
}
312+
313+
Object[] options = { "Yes", "No" };
314+
String title = "SPIFFS Unpack";
315+
String message = "Data directory not empty!\nAre you sure you want to overwrite this directory?";
316+
if(dataFolder.exists() && dataFolder.isDirectory()){
317+
File[] files = dataFolder.listFiles();
318+
if (files.length > 0 && JOptionPane.showOptionDialog(editor, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]) != JOptionPane.YES_OPTION){
319+
System.err.println();
320+
editor.statusError("SPIFFS Warning: unpack canceled!");
321+
return;
322+
}
323+
}
324+
325+
String dataPath = dataFolder.getAbsolutePath();
326+
306327
editor.statusNotice("SPIFFS Downloading Image...");
307328
System.out.println("[SPIFFS] download : "+imagePath);
308329
System.out.println("[SPIFFS] address: "+spiStart);
@@ -334,28 +355,6 @@ private void downloadAndUnpack(){
334355
editor.statusError("SPIFFS Download Failed!");
335356
return;
336357
}
337-
338-
339-
//load a list of all files
340-
int fileCount = 0;
341-
File dataFolder = new File(editor.getSketch().getFolder(), "data");
342-
if (!dataFolder.exists()) {
343-
dataFolder.mkdirs();
344-
}
345-
346-
Object[] options = { "Yes", "No" };
347-
String title = "SPIFFS Unpack";
348-
String message = "Data directory not empty!\nAre you sure you want to overwrite this directory?";
349-
if(dataFolder.exists() && dataFolder.isDirectory()){
350-
File[] files = dataFolder.listFiles();
351-
if (files.length > 0 && JOptionPane.showOptionDialog(editor, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]) != JOptionPane.YES_OPTION){
352-
System.err.println();
353-
editor.statusError("SPIFFS Warning: unpack canceled!");
354-
return;
355-
}
356-
}
357-
358-
String dataPath = dataFolder.getAbsolutePath();
359358

360359
editor.statusNotice("SPIFFS Unpacking Image...");
361360
System.out.println("[SPIFFS] data : "+dataPath);

src/MessageSiphonBS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ public void run() {
9191
if (!bsSeen) {
9292
c = '\n';
9393
bsSeen = true;
94-
System.err.print((char )c);
94+
System.out.print((char )c);
9595
beginningOfLine = true;
9696
}
9797
} else {
9898
bsSeen = false;
99-
System.err.print((char )c);
99+
System.out.print((char )c);
100100
beginningOfLine = (c == '\n');
101101
}
102102

0 commit comments

Comments
 (0)