Revision 7085
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
1060 | 1060 |
|
1061 | 1061 |
} //end try() |
1062 | 1062 |
|
1063 |
Date d = new Date(); |
|
1064 |
final File outputFile = new File(tmpDir, "metacat.output." + d.getTime()); |
|
1063 |
final File outputFile = File.createTempFile("metacat.output", null, tmpDir); |
|
1065 | 1064 |
OutputStream out = new FileOutputStream(outputFile); |
1066 | 1065 |
|
1067 | 1066 |
// Try to get the metadata file from disk. If it isn't |
Also available in: Unified diff
use Java-based temp file creation instead of Date (ms) timestamp to ensure uniqueness of the file and avoid re-use by two concurrent threads.