diff --git a/src/main/java/com/alibaba/excel/util/FileUtils.java b/src/main/java/com/alibaba/excel/util/FileUtils.java index 05e44712..20b16bc6 100644 --- a/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -144,7 +144,8 @@ public class FileUtils { } public static File createTmpFile(String fileName) { - return createDirectory(new File(tempFilePrefix + fileName)); + File directory = createDirectory(new File(tempFilePrefix)); + return new File(directory, fileName); } /**