mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Removing console logs (stdout.txt and stderr.txt) on exit. (Paul Stoffregen)
http://code.google.com/p/arduino/issues/detail?id=701
This commit is contained in:
parent
80a2154279
commit
b5c21fcefb
@ -133,16 +133,19 @@ public class EditorConsole extends JScrollPane {
|
||||
// The files and folders are not deleted on exit because they may be
|
||||
// needed for debugging or bug reporting.
|
||||
tempFolder = Base.createTempFolder("console");
|
||||
tempFolder.deleteOnExit();
|
||||
try {
|
||||
String outFileName = Preferences.get("console.output.file");
|
||||
if (outFileName != null) {
|
||||
outFile = new File(tempFolder, outFileName);
|
||||
outFile.deleteOnExit();
|
||||
stdoutFile = new FileOutputStream(outFile);
|
||||
}
|
||||
|
||||
String errFileName = Preferences.get("console.error.file");
|
||||
if (errFileName != null) {
|
||||
errFile = new File(tempFolder, errFileName);
|
||||
errFile.deleteOnExit();
|
||||
stderrFile = new FileOutputStream(errFile);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user