mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-06 01:08:25 +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
|
// The files and folders are not deleted on exit because they may be
|
||||||
// needed for debugging or bug reporting.
|
// needed for debugging or bug reporting.
|
||||||
tempFolder = Base.createTempFolder("console");
|
tempFolder = Base.createTempFolder("console");
|
||||||
|
tempFolder.deleteOnExit();
|
||||||
try {
|
try {
|
||||||
String outFileName = Preferences.get("console.output.file");
|
String outFileName = Preferences.get("console.output.file");
|
||||||
if (outFileName != null) {
|
if (outFileName != null) {
|
||||||
outFile = new File(tempFolder, outFileName);
|
outFile = new File(tempFolder, outFileName);
|
||||||
|
outFile.deleteOnExit();
|
||||||
stdoutFile = new FileOutputStream(outFile);
|
stdoutFile = new FileOutputStream(outFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
String errFileName = Preferences.get("console.error.file");
|
String errFileName = Preferences.get("console.error.file");
|
||||||
if (errFileName != null) {
|
if (errFileName != null) {
|
||||||
errFile = new File(tempFolder, errFileName);
|
errFile = new File(tempFolder, errFileName);
|
||||||
|
errFile.deleteOnExit();
|
||||||
stderrFile = new FileOutputStream(errFile);
|
stderrFile = new FileOutputStream(errFile);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user