Bug 394615 - Workspace name can't have single quote(') in it- else feature can't be exported
Summary: Workspace name can't have single quote(') in it- else feature can't be exported
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2012-11-20 00:36 EST by Deepali Virkar CLA
Modified: 2018-11-13 07:27 EST (History)
3 users (show)

See Also:


Attachments
log file for unbalanced quotes error. (6.98 KB, application/octet-stream)
2012-11-20 00:36 EST, Deepali Virkar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Deepali Virkar CLA 2012-11-20 00:36:04 EST
Created attachment 223740 [details]
log file for unbalanced quotes error.

-Create a workspace like "WS_Don'tDelete". 
-Create a feature project and try to export this feature. It throws error as unbalanced quotes. Please refer attached log.
-If workspace name has odd number of single quotes then only error is thrown else it works fine for even number of single quotes.
Comment 1 Michael Rennie CLA 2012-11-20 11:48:07 EST
Reproduced in:

Version: 4.3.0
Build id: I20121113-0800

to confirm this was not an AntRunner problem. When PDE build launches AntRunner all we are getting is the build file location, logger, input handler, etc. (no arguments) and task to run, so this would need to be fixed when PDE build generates the build.xml file it uses.
Comment 2 Andrew Niefer CLA 2012-11-20 12:01:05 EST
This would be a large fix in PDE/Build to properly escape all paths/names/etc in the generated xml scripts.

Writing to the build.xml mostly goes through the AntScript class.  There is a method getEscaped() to escape special characters.  There would need to be a pass on all the AntScript.print* methods to decide which arguments should be escaped.

There would then need to be a pass through all the places were AntScript.print() and println() are called directly.
Comment 3 Michael Rennie CLA 2012-11-20 13:40:08 EST
You can also reproduce the problem by:

1. generate build.xml for a plugin project: right-click > Plug-in tools > Create Ant buildfile
2. run that build file:

BUILD FAILED
C:\Users\mrennie\workspaces\workspace'd\PP\build.xml:222: The following error occurred while executing this line:
C:\Users\mrennie\workspaces\workspace'd\PP\build.xml:183: unbalanced quotes in -log 'C:\Users\mrennie\workspaces\workspace'd\PP/@dot.log'

Total time: 1 second
Comment 4 Lars Vogel CLA 2018-11-13 07:27:02 EST
Mass change for PDE Build bugs tagged with "helpwanted". PDE build is not actively enhanced, hence I close these bugs as wontfix. Please reopen if you want to contribute a patch.