Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328098 - infinite loop when opening file from an UNC path
Summary: infinite loop when opening file from an UNC path
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.3 M3   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 03:41 EDT by Krzysztof Kosmatka CLA
Modified: 2010-11-09 10:53 EST (History)
1 user (show)

See Also:


Attachments
patch to consider \\ on local windows as a root (1.53 KB, patch)
2010-10-19 12:25 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kosmatka CLA 2010-10-19 03:41:48 EDT
When I try to open file from network share, eclipse jupms into infinite loop.

Steps to reproduce:
1) In "Remote Systems" view add new "Local" connection
2) Right click on "Local Files" node, select "New->Filter..."
3) In "Folder" field type the name of network share (\\some\network\share)
4) Click Next, and then Finish

Result:
Selected network share shows up as a filter in Remote Systems view. I can browse folders, see files names, but when I try to open any file from this network share, it fails. In Progress view I see "Download". 

I found out, that program jupms into infinite loop in method org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile.getEncoding(), because method getParentPathFor("\") returns "\".

I hope I clearly explained, what the problem is.
Comment 1 Martin Oberhuber CLA 2010-10-19 05:10:33 EDT
Thanks for the report, and clear analysis! I would claim that product hangup is a major issue, so I'm pushing it up to a P2.

Who could look at a fix?

I'm afraid that UNC paths have not received much testing in RSE and more issues may be detected. Note that the Eclipse Platform team has prepared a Wiki page with recommendations for dealing with UNC paths:
   http://wiki.eclipse.org/Eclipse/UNC_Paths
Comment 2 David McKnight CLA 2010-10-19 12:24:00 EDT
I'll take a look.
Comment 3 David McKnight CLA 2010-10-19 12:25:52 EDT
Created attachment 181200 [details]
patch to consider \\ on local windows as a root

Could you please try your scenario out with this patch?  Also does a fix here need to be backported?
Comment 4 David McKnight CLA 2010-10-19 15:48:13 EDT
I've committed the change to the HEAD stream.  Please let me know if you need a backport for the RSE 3.2.2 release.
Comment 5 Krzysztof Kosmatka CLA 2010-10-20 01:38:33 EDT
Thanks, your patch fixes the problem. I dont't need a backport.