Merge pull request #412 from pgkiran/filepeon-cleanup

Temp filePeon files cleanup
This commit is contained in:
fjy 2014-03-04 10:29:52 -07:00
commit 4983210907
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ public class TmpFileIOPeon implements IOPeon
File retFile = createdFiles.get(filename); File retFile = createdFiles.get(filename);
if (retFile == null) { if (retFile == null) {
retFile = File.createTempFile("filePeon", filename); retFile = File.createTempFile("filePeon", filename);
retFile.deleteOnExit();
createdFiles.put(filename, retFile); createdFiles.put(filename, retFile);
} }
return new BufferedOutputStream(new FileOutputStream(retFile)); return new BufferedOutputStream(new FileOutputStream(retFile));