From 154d5502efd7ab83859da000c69885f0f8bdc298 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 16 十一月 2022 16:43:23 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/helper/PathHelper.java | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/helper/PathHelper.java b/src/main/java/com/lf/server/helper/PathHelper.java index 0d6b718..52bb793 100644 --- a/src/main/java/com/lf/server/helper/PathHelper.java +++ b/src/main/java/com/lf/server/helper/PathHelper.java @@ -122,6 +122,22 @@ } /** + * 鑾峰彇涓存椂璺緞 + */ + public String getTempPath(String subPath) { + if (!StringHelper.isEmpty(subPath)) { + String path = config.getTempPath() + File.separator + subPath; + + File file = new File(path); + if (file.exists() && file.isDirectory()) { + return path; + } + } + + return getTempPath(); + } + + /** * 鍒犻櫎鏃ц矾寰� */ public void deleteOldPath(String tempPath) { -- Gitblit v1.9.3