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

Bug 71808

Summary: [Patch] Error handling of quotes in name of patch file should be improved
Product: [Eclipse Project] Platform Reporter: Eric Rizzo <eclipse-bugs>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P5 Keywords: helpwanted
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Eric Rizzo CLA 2004-08-11 13:20:52 EDT
If I use a patch file name that contains quotation marks (") the Create Patch
dialog allows it as a file name, but fails with an interal error when trying to
create the file. Here is the stack trace from .log:

!ENTRY org.eclipse.team.cvs.ui 4 0 Aug 11, 2004 12:29:03.275
!MESSAGE An internal error has occurred, consult the error log for details.
!STACK 0
java.io.FileNotFoundException:
C:\Java\eclipse\workspace-3.0\Sandbox\patches\"hello".patch (The filename,
directory name, or volume label syntax is incorrect)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
	at
org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileOperation.run(GenerateDiffFileOperation.java:73)
	at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)


Steps to reproduce:
1) Select Team > Create patch.. to bringup the patch dialog.
2) Select "Save in workspace" option and choose a workspace folder
3) Enter a file name that includes quotatio marks (eg, "test".patch)
4) Click Finish button
Comment 1 Michael Valenta CLA 2004-08-11 14:02:37 EDT
The error handling in this cause is poor. The FileNotFoundException should be 
caught and an appropriate error message displayed.
Comment 2 Bogdan Gheorghe CLA 2005-08-04 11:59:04 EDT
Fixed in Eclipse 3.1 GA. Please verify and reopen if you feel this is still an
issue. Thanks!
Comment 3 Bogdan Gheorghe CLA 2005-11-01 14:23:55 EST
The new Create Patch wizard needs to handle failure cases with grace and finesse.
Comment 4 Michael Valenta CLA 2006-08-17 10:51:30 EDT
We do not plan on addressing this issue in 3.3.
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:31:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 6 Eclipse Genie CLA 2022-01-08 19:47:08 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.