Bug 182350 - [efs] Error message when creating a remote project on a Windows drive
Summary: [efs] Error message when creating a remote project on a Windows drive
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks: 203376
  Show dependency tree
 
Reported: 2007-04-13 11:52 EDT by Kevin Doyle CLA
Modified: 2007-11-08 09:36 EST (History)
2 users (show)

See Also:
xuanchen: review+


Attachments
Patch fixing the issue in "Create Remote Project" action (1.49 KB, patch)
2007-09-13 17:38 EDT, Martin Oberhuber CLA
no flags Details | Diff
Amended patch adding connection name and supporting UNIX roots (2.29 KB, patch)
2007-09-13 17:56 EDT, Martin Oberhuber CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-04-13 11:52:01 EDT
Expand your local connection till you get to the drives.  Right click on your C:\ drive and select "Create Remote Project".  A Dialog pops up then disappears.

Error Log shows:

!ENTRY org.eclipse.rse.ui 4 0 2007-04-13 11:41:41.236
!MESSAGE Error creating temp project
!STACK 1
org.eclipse.core.internal.resources.ResourceException: : is an invalid character in resource name 'C:'.
	at org.eclipse.core.internal.resources.Resource.checkValidPath(Resource.java:415)
	at org.eclipse.core.internal.resources.Project.create(Project.java:221)
	at org.eclipse.rse.internal.eclipse.filesystem.ui.actions.CreateRemoteProjectActionDelegate.createRemoteProject(CreateRemoteProjectActionDelegate.java:191)
	at org.eclipse.rse.internal.eclipse.filesystem.ui.actions.CreateRemoteProjectActionDelegate.access$0(CreateRemoteProjectActionDelegate.java:170)
	at org.eclipse.rse.internal.eclipse.filesystem.ui.actions.CreateRemoteProjectActionDelegate$1.run(CreateRemoteProjectActionDelegate.java:131)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
!SUBENTRY 1 org.eclipse.core.resources 4 77 2007-04-13 11:41:41.236
!MESSAGE : is an invalid character in resource name 'C:'.

-----------Enter bugs above this line-----------
installation : eclipse-SDK-3.3M6
RSE install  : RSE 2.0M6
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-05-30 08:29:46 EDT
Seems a duplicate of EFS URI issues.
Comment 2 Kevin Doyle CLA 2007-09-13 10:39:49 EDT
Tried this again with 2.0.1RC1 and now it displays an error.

"Internal Error: : is an invalid character in resource name 'C:'."

If you go to File -> New -> Project.  General -> Project.  Uncheck "Use default location".  Change the file system to RSE.  Click "Browse...".  Select your C:\.  It will display the error "Invalid location path".  ":" is not valid in the URI.
Comment 3 Martin Oberhuber CLA 2007-09-13 17:29:59 EDT
This is actually two bugs:

Using the original steps from description ("Create Remote Project"), it is in 
   CreateRemoteProjectActionDelegate#createRemoteProject()
The directory name needs to remove trailing slashes, and escape character : when computing a default project name.

Using the steps to reproduce from comment #2, this is actually not a problem with RSE, but with 
   ProjectContentsLocationArea#checkValidLocation()
That method takes the URI from the selected remote resource, and extracts the last segment to generate a default project name out of it. It also needs to escape the : and \ characters. For this fix, th bug needs to be reassigned to Platform IDE.
Comment 4 Martin Oberhuber CLA 2007-09-13 17:30:37 EDT
Workaround is to use the method from comment #2, and manually specify a project name e.g. "C".
Comment 5 Martin Oberhuber CLA 2007-09-13 17:38:12 EDT
Created attachment 78388 [details]
Patch fixing the issue in "Create Remote Project" action

Attached patch fixes the issue by stripping off characters :\ in directory names.
Comment 6 Martin Oberhuber CLA 2007-09-13 17:56:19 EDT
Created attachment 78389 [details]
Amended patch adding connection name and supporting UNIX roots
Comment 7 Martin Oberhuber CLA 2007-09-13 17:59:07 EDT
Xuan can you review this?
Comment 8 Kevin Doyle CLA 2007-09-13 18:02:25 EDT
Patch looks good.  Can use Create Remote Project on Drives now.

Using the Eclipse New Project dialog it doesn't allow ":" in the Location URI, but it is a valid URI.  Will need a bug against the platform.
Comment 9 Martin Oberhuber CLA 2007-09-13 18:07:48 EDT
Committed the Fix for RSE.
Filed bug 203376 for the Platform IDE part of the issue.
Comment 10 Xuan Chen CLA 2007-09-13 19:06:38 EDT
The fix looks good.

But I got "Invalid thread access" if I cancel the creation of the remote project on C drive.  I will open a different bug for this problem
Comment 11 Kevin Doyle CLA 2007-11-08 09:36:04 EST
Verified fixed in I20071108.