Bug 360345 - Fileupload always error when upload file with 1 character file name
Summary: Fileupload always error when upload file with 1 character file name
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Incubator (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2011-10-09 01:57 EDT by Jeffry Santoso CLA
Modified: 2011-10-10 17:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffry Santoso CLA 2011-10-09 01:57:29 EDT
Build Identifier: 20110615-0604

In org.eclipse.rap.rwt.supplemental.filedialog_1.4.0.201108091246, if you upload a file with only 1 character file name (example 1.jpg, a.txt, etc), it always error.  Else (file name with 2 character or more) is not problem.

The error always can be produced in org.eclipse.rap.rwt.supplemental.fileupload.DiskFileUploadReceiver in method createTargetFile when execute File.createTempFile (line 60), and the error message is "java.lang.IllegalArgumentException: Prefix string too short" can be caught in FileUploadProcessor  in line 66).

Reproducible: Always

Steps to Reproduce:
1. Open FileDialog to open file chooser to upload.
2. Choose file with 1 character file name.
3. Progress bar will be marked with red color.
Comment 1 Jeffry Santoso CLA 2011-10-09 02:02:52 EDT
Replace org.eclipse.rap.rwt.supplemental.fileupload.DiskFileUploadReceiver with DiskFileUploadReceiver in CVS HEAD.
Comment 2 Ralf Sternberg CLA 2011-10-09 04:45:49 EDT
Thanks for the bug report, Jeffry. I guess you closed this bug by accident, didn't you?
In HEAD, the issue has been fixed with bug 358248. Maybe we can backport this change to the 1.4 version.
Comment 3 Jeffry Santoso CLA 2011-10-09 10:51:39 EDT
Yes, sorry Ralf.  Like you said, in the HEAD the issue has been fixed, but the 1.4 hasn't fixed yet.
Comment 4 Ivan Furnadjiev CLA 2011-10-10 09:33:56 EDT
Back-ported the changes from DiskFileUploadReceiver to v14_Maintenance branch.
Comment 5 Ralf Sternberg CLA 2011-10-10 17:38:37 EDT
The 1.4/incubator repository has been updated.