From 470ca7784dc80df5a2d23769ca8c0922ab1f001a Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Thu, 23 Apr 2020 14:54:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-29182=20&=20REPORT-29600=20weblogic?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=AF=BC=E5=87=BAexcel=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fine-poi/src/com/fr/third/v2/org/apache/poi/util/TempFile.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fine-poi/src/com/fr/third/v2/org/apache/poi/util/TempFile.java b/fine-poi/src/com/fr/third/v2/org/apache/poi/util/TempFile.java index 77ee75f69..838554a50 100644 --- a/fine-poi/src/com/fr/third/v2/org/apache/poi/util/TempFile.java +++ b/fine-poi/src/com/fr/third/v2/org/apache/poi/util/TempFile.java @@ -93,7 +93,8 @@ public final class TempFile { @Override public File createTempFile(String prefix, String suffix) throws IOException { // 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.mkdir();