[
https://issues.apache.org/jira/browse/FILEUPLOAD-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369774#comment-17369774
]
yangshulin edited comment on FILEUPLOAD-338 at 6/26/21, 12:55 AM:
------------------------------------------------------------------
Sorry, I don't know how to unit test FileUpload.
Below is the critical crash stack:
org.apache.commons.io.FileExistsException: Destination
'C:\Users\XX\Documents\Web\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\medias\1624668135089.jpg'
already exists
at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2568)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:405)
I think it is a bug of FileUtils.moveFile, this crash appears on FileUpload
1.4, FileUpload 1.3 works well, because it uses IOUtils to copy streams.
was (Author: yang2021):
I don't think this library can be unit test. Below is the critical crash stack:
org.apache.commons.io.FileExistsException: Destination
'C:\Users\XX\Documents\Web\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\medias\1624668135089.jpg'
already exists
at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2568)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:405)
I think it is a bug of FileUtils
> FileItem.write crash on Windows Tomcat
> --------------------------------------
>
> Key: FILEUPLOAD-338
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-338
> Project: Commons FileUpload
> Issue Type: Bug
> Affects Versions: 1.4
> Reporter: yangshulin
> Priority: Critical
>
> When I use FileItem.write on FileUpload 1.4, it will crash on Windows Tomcat,
> linux server has not been tested. I find it is crashed by FileUtils.moveFile,
> which reports IO Exception. FileUpload 1.3 works well, because it use file
> streams copying.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)