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:
David A. Mellis 2011-12-30 10:17:06 -05:00
parent 80a2154279
commit b5c21fcefb
1 changed files with 3 additions and 0 deletions

View File

@ -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) {