Bug 415488 - Unable to launch runtime workbench with # in the workspace -data location
Summary: Unable to launch runtime workbench with # in the workspace -data location
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 4.4 M2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 10:32 EDT by Curtis Windatt CLA
Modified: 2013-08-30 15:00 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2013-08-20 10:32:34 EDT
1) Set workspace to clear before launch
2) Turn on ask before clearing
3) Launch -- > Prompted to clear workspace
4) Add special character # to workspace path
5) Launch -- > No prompt, straight to workspace
Comment 1 Curtis Windatt CLA 2013-08-20 10:57:11 EDT
Moving to Equinox for comment.  The problem is that the workspace being used is not the location specified (while the clear check is looking at the specified location).

So for example:
C:\Users\windattc\#Documents\WS\WorkspaceTemp

The clear workspace check sees that this location doesn't exist, so it doesn't need to be cleared.  However, the actual workspace is created at c:\Users\windattc
Comment 2 Curtis Windatt CLA 2013-08-20 12:55:33 EDT
A few additional notes:

1) Only '#' appears to be a problem, '$' and spaces appear to work correctly.  This could be due to # being an additional reserved character in RFC 3896 vs RFC 2396.

2) Mike pointed out that PDE is converting the workspace to a URL to pass it to the Location service (to check for workspace lock).  The service does not specify whether the URL should have special characters encoded or not.

3) I was concerned that this could lead to PDE deleting your entire user directory.  However, PDE doesn't convert anything to URLs to do the clear workspace steps so PDE will delete the correct directory.  This bug is preventing me from testing a scenario with special characters in the workspace path and is very confusing when encountered, but a typical user won't run into it.
Comment 3 Thomas Watson CLA 2013-08-20 17:31:14 EDT
We do not support # in the workspace location.  I don't think the readme really spells this out, it only mentions the install location.  But it applies to all locations (install, data etc.).

*** This bug has been marked as a duplicate of bug 338181 ***
Comment 4 Curtis Windatt CLA 2013-08-20 17:56:54 EDT
Moving back to PDE.  We should add some basic sanity checking to the launch config field.
Comment 5 Curtis Windatt CLA 2013-08-20 17:58:43 EDT
(In reply to comment #2)
> 2) Mike pointed out that PDE is converting the workspace to a URL to pass it
> to the Location service (to check for workspace lock).  The service does not
> specify whether the URL should have special characters encoded or not.

Tom, any idea whether the Location service expects the url to be encoded or not?  I haven't seen any problems locking my test workspace that has a space, so I am guessing what we pass in currently is fine.
Comment 6 Curtis Windatt CLA 2013-08-30 15:00:20 EDT
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=ef6a316498c0978b400a990bf2a13033a68e61c2
Fixed in master

Doesn't check variable substitution, but checking that can cause dialogs to open.