Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360345

Summary: Fileupload always error when upload file with 1 character file name
Product: [RT] RAP Reporter: Jeffry Santoso <jef>
Component: IncubatorAssignee: Project Inbox <rap.incubator-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: bugday
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.