|
|
@ -93,7 +93,8 @@ public final class TempFile { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public File createTempFile(String prefix, String suffix) throws IOException { |
|
|
|
public File createTempFile(String prefix, String suffix) throws IOException { |
|
|
|
// Identify and create our temp dir, if needed
|
|
|
|
// Identify and create our temp dir, if needed
|
|
|
|
if (dir == null) |
|
|
|
// 这里判断下路径是否存在,省的再排查temp目录丢失的问题
|
|
|
|
|
|
|
|
if (dir == null || !dir.exists()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
dir = new File(System.getProperty("java.io.tmpdir"), "poifiles"); |
|
|
|
dir = new File(System.getProperty("java.io.tmpdir"), "poifiles"); |
|
|
|
dir.mkdir(); |
|
|
|
dir.mkdir(); |
|
|
|