diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java index 8c5a1985b..ae5594509 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java @@ -110,7 +110,7 @@ public class FileUploadUtils desc.getParentFile().mkdirs(); } } - return desc; + return desc.isAbsolute() ? desc : desc.getAbsoluteFile(); } private static final String getPathFileName(String fileName) throws IOException