Summary: | [efs] New Project using RSE can't be done with Local Connection | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Kevin Doyle <kjdoyle> | ||||
Component: | RSE | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||
Status: | CLOSED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
Severity: | normal | ||||||
Priority: | P3 | CC: | dmcknigh, kmunir | ||||
Version: | 2.0 | ||||||
Target Milestone: | 2.0.1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Kevin Doyle
2007-05-28 10:08:53 EDT
Hm, I've been doing this before and it always worked for me. Need to investigate. Created attachment 73658 [details]
Path must start with "/" and URI's can't contain "\"
The issue is that URI's can't contain "\", but getting the absolutepath of a file on windows will contain "\". Also if you specify a hostname when creating a URI the path must start with "/", but on Windows this wasn't the case.
Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Thanks for the patch, but I think it is a little too simple because on UNIX, it is valid that file names contain the \ character -- these would be lost by your patch. One safe option is to try IRemoteFileSubSystem.isUnixStyle() to check whether the path should be translated. The other option, which I'd personally prefer (since isUnixStyle() is not 100% reliable because it is computed statically) is this: String sep = PathUtility.getSeparator(path); if (!sep.equals("/")) { path = path.replace(sep.charAt(0),'/')); } for prepending the /, I think you should use the code from URIUtil.toURI() in order to also handle UNC. This one is also used in the base implementation of FileSystemContributor.getURI() (so we should also use it in our getURI(), I think). Martin, have you tried to do a project with a folder that has a "\" on unix? When I was creating the patch I only added the "/" to the front of the path at first and then it would display the URI in the dialog, but you couldn't continue as it was an invalid URI b/c of the "\", which became %5. Also I can't rename a file/folder on a dstore linux machine to contain a "\" or I would try this myself. The URI looked like this: rse://LOCALHOST/D:%5Ckevin%5Callfiles Thanks for the points on URI's. Fixed the issue properly: [189441] fix EFS operations on Windows (Local) systems RSEFileSystemContributor 1.2 RSEFileStore.java 1.2 Verified on Linux that from the URI point of view, \ characters are escaped properly as %5C. But there are other issues with \ characters, being tracked as bug #199448. Not following this for now. Verified with I20070823-0800. Comment on attachment 73658 [details]
Path must start with "/" and URI's can't contain "\"
This patch was not adopted.
|