Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
bdde195e
Commit
bdde195e
authored
May 11, 2021
by
若依
Browse files
!225 【bug修复】文件上传时出现java.nio.file.FileAlreadyExistsException
Merge pull request !225 from CANYON/master
parents
50034301
14ea0713
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
View file @
bdde195e
...
...
@@ -130,14 +130,10 @@ public class FileUploadUtils
private
static
final
File
getAbsoluteFile
(
String
uploadDir
,
String
fileName
)
throws
IOException
{
File
desc
=
new
File
(
uploadDir
+
File
.
separator
+
fileName
);
if
(!
desc
.
getParentFile
().
exists
())
{
desc
.
getParentFile
().
mkdirs
();
}
if
(!
desc
.
exists
())
{
desc
.
createNewFile
();
if
(!
desc
.
exists
())
{
if
(!
desc
.
getParentFile
().
exists
())
{
desc
.
getParentFile
().
mkdirs
();
}
}
return
desc
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment